diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-10-07 22:42:59 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-10-07 22:43:14 -0700 |
| commit | c0d7eea69ea3885f97c6ccc0525a3318efd2ab6a (patch) | |
| tree | ee8543bb2a32a3ba4f732d5019bcedc028a95b38 /site/src | |
| parent | d7b5b81b5d6ec55d0847b5171c3800a8f7b5c001 (diff) | |
fix: remove unused language switcher props
Diffstat (limited to 'site/src')
| -rw-r--r-- | site/src/components/LanguageSwitcher.tsx | 11 | ||||
| -rw-r--r-- | site/src/components/TitleBar.tsx | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/site/src/components/LanguageSwitcher.tsx b/site/src/components/LanguageSwitcher.tsx index 8cceb35..4601c47 100644 --- a/site/src/components/LanguageSwitcher.tsx +++ b/site/src/components/LanguageSwitcher.tsx @@ -7,11 +7,7 @@ const languages = [ { code: 'ja', name: '日本語' } ]; -interface LanguageSwitcherProps { - variant?: 'compact' | 'standard'; -} - -function LanguageSwitcher({ variant = 'standard' }: LanguageSwitcherProps) { +const LanguageSwitcher = () => { const { i18n } = useTranslation(); const [searchParams] = useSearchParams(); const isMoe = searchParams.has("moe"); @@ -41,7 +37,7 @@ function LanguageSwitcher({ variant = 'standard' }: LanguageSwitcherProps) { className={` flex items-center justify-between transition-all duration-200 text-sm rounded - ${variant === 'compact' ? 'px-2 py-0.5 min-w-[80px]' : 'px-3 py-1.5 min-w-[100px]'} + px-2 py-0.5 min-w-[80px] ${isMoe ? 'bg-pink-200 text-pink-800 hover:bg-pink-300' : 'bg-gray-800 text-gray-300 hover:bg-gray-700 hover:text-white' @@ -71,8 +67,7 @@ function LanguageSwitcher({ variant = 'standard' }: LanguageSwitcherProps) { {isOpen && ( <div className={` - absolute right-0 mt-1 z-10 shadow-lg rounded-md overflow-hidden - ${variant === 'compact' ? 'w-24' : 'w-32'} + absolute right-0 mt-1 z-10 shadow-lg rounded-md overflow-hidden w-24 ${isMoe ? 'bg-pink-100 border border-pink-300' : 'bg-gray-800 border border-gray-700'} `} > diff --git a/site/src/components/TitleBar.tsx b/site/src/components/TitleBar.tsx index 3822980..c1f0a00 100644 --- a/site/src/components/TitleBar.tsx +++ b/site/src/components/TitleBar.tsx @@ -92,7 +92,7 @@ const TitleBar: React.FC = () => { > {t('game_selector')} </Link> - <LanguageSwitcher variant="compact" /> + <LanguageSwitcher /> </div> </div> </div> |
