fix: typo (#357)

* feat: resource dialog enhancements

* update

* fix: typo

Co-authored-by: boojack <stevenlgtm@gmail.com>
This commit is contained in:
Zeng1998 2022-10-29 09:13:11 +08:00 committed by GitHub
parent b891e08928
commit 30daea0c4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -90,7 +90,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
inputEl.click();
};
const handlPreviewBtnClick = (resource: Resource) => {
const handlePreviewBtnClick = (resource: Resource) => {
const resourceUrl = `${window.location.origin}/o/r/${resource.id}/${resource.filename}`;
if (resource.type.startsWith("image")) {
showPreviewImageDialog(resourceUrl);
@ -194,7 +194,7 @@ const ResourcesDialog: React.FC<Props> = (props: Props) => {
<>
<button
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")}
</button>