Unverified Commit 30daea0c authored by Zeng1998's avatar Zeng1998 Committed by GitHub

fix: typo (#357)

* feat: resource dialog enhancements

* update

* fix: typo
Co-authored-by: 's avatarboojack <stevenlgtm@gmail.com>
parent b891e089
...@@ -90,7 +90,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => { ...@@ -90,7 +90,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
inputEl.click(); inputEl.click();
}; };
const handlPreviewBtnClick = (resource: Resource) => { const handlePreviewBtnClick = (resource: Resource) => {
const resourceUrl = `${window.location.origin}/o/r/${resource.id}/${resource.filename}`; const resourceUrl = `${window.location.origin}/o/r/${resource.id}/${resource.filename}`;
if (resource.type.startsWith("image")) { if (resource.type.startsWith("image")) {
showPreviewImageDialog(resourceUrl); showPreviewImageDialog(resourceUrl);
...@@ -194,7 +194,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => { ...@@ -194,7 +194,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
<> <>
<button <button
className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100" className="w-full text-left text-sm leading-6 py-1 px-3 cursor-pointer rounded hover:bg-gray-100"
onClick={() => handlPreviewBtnClick(resource)} onClick={() => handlePreviewBtnClick(resource)}
> >
{t("resources.preview")} {t("resources.preview")}
</button> </button>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment