From ab9d6f6b4444bbea0c16160b81454c23d50e598d Mon Sep 17 00:00:00 2001 From: gluzzati Date: Fri, 22 Mar 2024 00:41:14 +0000 Subject: [PATCH] more cleanups --- .../src/components/admin/configuration/ConfigurationNavBar.tsx | 2 -- frontend/src/components/header/ActionAvatar.tsx | 2 -- frontend/src/components/header/NavbarShareMenu.tsx | 2 -- frontend/src/components/share/FilePreview.tsx | 2 -- frontend/src/pages/404.tsx | 1 - frontend/src/pages/admin/intro.tsx | 1 - frontend/src/pages/auth/resetPassword/index.tsx | 1 - frontend/src/pages/index.tsx | 1 - 8 files changed, 12 deletions(-) diff --git a/frontend/src/components/admin/configuration/ConfigurationNavBar.tsx b/frontend/src/components/admin/configuration/ConfigurationNavBar.tsx index f2bece5..060d513 100644 --- a/frontend/src/components/admin/configuration/ConfigurationNavBar.tsx +++ b/frontend/src/components/admin/configuration/ConfigurationNavBar.tsx @@ -13,7 +13,6 @@ import Link from "next/link"; import { Dispatch, SetStateAction } from "react"; import { TbAt, TbMail, TbShare, TbSocial, TbSquare } from "react-icons/tb"; import { FormattedMessage } from "react-intl"; -import useConfig from "../../../hooks/config.hook"; const webroot = process.env.WEBROOT || ""; @@ -49,7 +48,6 @@ const ConfigurationNavBar = ({ setIsMobileNavBarOpened: Dispatch>; }) => { const { classes } = useStyles(); - const config = useConfig(); return ( { const { user } = useUser(); - const config = useConfig(); return ( diff --git a/frontend/src/components/header/NavbarShareMenu.tsx b/frontend/src/components/header/NavbarShareMenu.tsx index 9a70efe..b29d7e5 100644 --- a/frontend/src/components/header/NavbarShareMenu.tsx +++ b/frontend/src/components/header/NavbarShareMenu.tsx @@ -2,12 +2,10 @@ import { ActionIcon, Menu } from "@mantine/core"; import Link from "next/link"; import { TbArrowLoopLeft, TbLink } from "react-icons/tb"; import { FormattedMessage } from "react-intl"; -import useConfig from "../../hooks/config.hook"; const webroot = process.env.WEBROOT || ""; const NavbarShareMneu = () => { - const config = useConfig(); return ( diff --git a/frontend/src/components/share/FilePreview.tsx b/frontend/src/components/share/FilePreview.tsx index ee2af2e..a27cef6 100644 --- a/frontend/src/components/share/FilePreview.tsx +++ b/frontend/src/components/share/FilePreview.tsx @@ -12,7 +12,6 @@ import React, { Dispatch, SetStateAction, useEffect, useState } from "react"; import { FormattedMessage } from "react-intl"; import api from "../../services/api.service"; import Markdown from "markdown-to-jsx"; -import useConfig from "../../hooks/config.hook"; const webroot = process.env.WEBROOT || ""; @@ -38,7 +37,6 @@ const FilePreview = ({ mimeType: string; }) => { const [isNotSupported, setIsNotSupported] = useState(false); - const config = useConfig(); if (isNotSupported) return ; return ( diff --git a/frontend/src/pages/404.tsx b/frontend/src/pages/404.tsx index df10c1a..65af037 100644 --- a/frontend/src/pages/404.tsx +++ b/frontend/src/pages/404.tsx @@ -9,7 +9,6 @@ import { import Link from "next/link"; import Meta from "../components/Meta"; import { FormattedMessage } from "react-intl"; -import useConfig from "../hooks/config.hook"; const webroot = process.env.WEBROOT || ""; diff --git a/frontend/src/pages/admin/intro.tsx b/frontend/src/pages/admin/intro.tsx index 2c71c07..4554fdf 100644 --- a/frontend/src/pages/admin/intro.tsx +++ b/frontend/src/pages/admin/intro.tsx @@ -10,7 +10,6 @@ import { import Link from "next/link"; import Logo from "../../components/Logo"; import Meta from "../../components/Meta"; -import useConfig from "../../hooks/config.hook"; const webroot = process.env.WEBROOT || ""; diff --git a/frontend/src/pages/auth/resetPassword/index.tsx b/frontend/src/pages/auth/resetPassword/index.tsx index 21f4bf2..e61ffda 100644 --- a/frontend/src/pages/auth/resetPassword/index.tsx +++ b/frontend/src/pages/auth/resetPassword/index.tsx @@ -20,7 +20,6 @@ import * as yup from "yup"; import useTranslate from "../../../hooks/useTranslate.hook"; import authService from "../../../services/auth.service"; import toast from "../../../utils/toast.util"; -import useConfig from "../../../hooks/config.hook"; const webroot = process.env.WEBROOT || ""; diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index f0482d2..64e74c2 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -16,7 +16,6 @@ import { FormattedMessage } from "react-intl"; import Logo from "../components/Logo"; import Meta from "../components/Meta"; import useUser from "../hooks/user.hook"; -import useConfig from "../hooks/config.hook"; const webroot = process.env.WEBROOT || "";