Doceditor: fix pdf icon

This commit is contained in:
Timofey Boyko 2024-02-27 13:45:16 +03:00
parent 8aef7caf62
commit c0e07ed205

View File

@ -12,7 +12,7 @@ import PDFIcoUrl from "PUBLIC_DIR/images/pdf.ico?url";
interface UseRootInitProps {
documentType?: string;
fileType?: "pdf" | FileType;
fileType?: FileType;
}
const useRootInit = ({ documentType, fileType }: UseRootInitProps) => {
@ -21,7 +21,7 @@ const useRootInit = ({ documentType, fileType }: UseRootInitProps) => {
switch (documentType) {
case "word":
icon = fileType === "pdf" ? PDFIcoUrl : TextIcoUrl;
icon = TextIcoUrl;
break;
case "slide":
icon = PresentationIcoUrl;
@ -29,6 +29,9 @@ const useRootInit = ({ documentType, fileType }: UseRootInitProps) => {
case "cell":
icon = SpreadSheetIcoUrl;
break;
case "pdf":
icon = PDFIcoUrl;
break;
default:
icon = TextIcoUrl;
break;