diff --git a/frontend/src/components/share/FilePreview.tsx b/frontend/src/components/share/FilePreview.tsx
index 0d06f9c..43b8f1b 100644
--- a/frontend/src/components/share/FilePreview.tsx
+++ b/frontend/src/components/share/FilePreview.tsx
@@ -14,6 +14,7 @@ import api from "../../services/api.service";
import Markdown from "markdown-to-jsx";
import useConfig from "../../hooks/config.hook";
+
const FilePreviewContext = React.createContext<{
shareId: string;
fileId: string;
@@ -36,8 +37,8 @@ const FilePreview = ({
mimeType: string;
}) => {
const [isNotSupported, setIsNotSupported] = useState(false);
- if (isNotSupported) return ;
const config = useConfig();
+ if (isNotSupported) return ;
return (