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 { interface UseRootInitProps {
documentType?: string; documentType?: string;
fileType?: "pdf" | FileType; fileType?: FileType;
} }
const useRootInit = ({ documentType, fileType }: UseRootInitProps) => { const useRootInit = ({ documentType, fileType }: UseRootInitProps) => {
@ -21,7 +21,7 @@ const useRootInit = ({ documentType, fileType }: UseRootInitProps) => {
switch (documentType) { switch (documentType) {
case "word": case "word":
icon = fileType === "pdf" ? PDFIcoUrl : TextIcoUrl; icon = TextIcoUrl;
break; break;
case "slide": case "slide":
icon = PresentationIcoUrl; icon = PresentationIcoUrl;
@ -29,6 +29,9 @@ const useRootInit = ({ documentType, fileType }: UseRootInitProps) => {
case "cell": case "cell":
icon = SpreadSheetIcoUrl; icon = SpreadSheetIcoUrl;
break; break;
case "pdf":
icon = PDFIcoUrl;
break;
default: default:
icon = TextIcoUrl; icon = TextIcoUrl;
break; break;