From 7104ac09f474f61dfff52dc34b4c145c7ebbb8da Mon Sep 17 00:00:00 2001 From: NFish Date: Thu, 29 May 2025 11:08:21 +0800 Subject: [PATCH] fix: remove unused imports --- .../webapp-reset-password/layout.tsx | 2 +- .../(shareLayout)/webapp-signin/LoginLogo.tsx | 30 ------------- .../(shareLayout)/webapp-signin/_header.tsx | 42 ------------------- .../webapp-signin/assets/github.svg | 17 -------- .../webapp-signin/assets/google.svg | 13 ------ .../webapp-signin/check-code/page.tsx | 2 +- .../(shareLayout)/webapp-signin/layout.tsx | 2 +- .../webapp-signin/page.module.css | 7 ---- 8 files changed, 3 insertions(+), 112 deletions(-) delete mode 100644 web/app/(shareLayout)/webapp-signin/LoginLogo.tsx delete mode 100644 web/app/(shareLayout)/webapp-signin/_header.tsx delete mode 100644 web/app/(shareLayout)/webapp-signin/assets/github.svg delete mode 100644 web/app/(shareLayout)/webapp-signin/assets/google.svg delete mode 100644 web/app/(shareLayout)/webapp-signin/page.module.css diff --git a/web/app/(shareLayout)/webapp-reset-password/layout.tsx b/web/app/(shareLayout)/webapp-reset-password/layout.tsx index c7df9ecd27..e0ac6b9ad6 100644 --- a/web/app/(shareLayout)/webapp-reset-password/layout.tsx +++ b/web/app/(shareLayout)/webapp-reset-password/layout.tsx @@ -17,7 +17,7 @@ export default function SignInLayout({ children }: any) { 'md:px-[108px]', ) }> -
+
{children}
diff --git a/web/app/(shareLayout)/webapp-signin/LoginLogo.tsx b/web/app/(shareLayout)/webapp-signin/LoginLogo.tsx deleted file mode 100644 index 73dfb88205..0000000000 --- a/web/app/(shareLayout)/webapp-signin/LoginLogo.tsx +++ /dev/null @@ -1,30 +0,0 @@ -'use client' -import type { FC } from 'react' -import classNames from '@/utils/classnames' -import { useGlobalPublicStore } from '@/context/global-public-context' -import { useTheme } from 'next-themes' - -type LoginLogoProps = { - className?: string -} - -const LoginLogo: FC = ({ - className, -}) => { - const { systemFeatures } = useGlobalPublicStore() - const { theme } = useTheme() - - let src = theme === 'light' ? '/logo/logo-site.png' : `/logo/logo-site-${theme}.png` - if (systemFeatures.branding.enabled) - src = systemFeatures.branding.login_page_logo - - return ( - logo - ) -} - -export default LoginLogo diff --git a/web/app/(shareLayout)/webapp-signin/_header.tsx b/web/app/(shareLayout)/webapp-signin/_header.tsx deleted file mode 100644 index 5e85a8d306..0000000000 --- a/web/app/(shareLayout)/webapp-signin/_header.tsx +++ /dev/null @@ -1,42 +0,0 @@ -'use client' -import React from 'react' -import { useContext } from 'use-context-selector' -import Select from '@/app/components/base/select/locale' -import Divider from '@/app/components/base/divider' -import { languages } from '@/i18n/language' -import type { Locale } from '@/i18n' -import I18n from '@/context/i18n' -import dynamic from 'next/dynamic' - -// Avoid rendering the logo and theme selector on the server -const DifyLogo = dynamic(() => import('@/app/components/base/logo/dify-logo'), { - ssr: false, - loading: () =>
, -}) -const ThemeSelector = dynamic(() => import('@/app/components/base/theme-selector'), { - ssr: false, - loading: () =>
, -}) - -const Header = () => { - const { locale, setLocaleOnClient } = useContext(I18n) - - return ( -
- -
-