mirror of
https://github.com/APIParkLab/APIPark.git
synced 2026-06-14 20:41:15 +08:00
fix:login with language setting
This commit is contained in:
@@ -5,7 +5,7 @@ import { memo, useEffect, useMemo } from 'react';
|
||||
import { useGlobalContext } from '@common/contexts/GlobalStateContext';
|
||||
import { Icon } from '@iconify/react/dist/iconify.js';
|
||||
|
||||
const LanguageSetting = () => {
|
||||
const LanguageSetting = ({mode = 'light'}:{mode?:'dark'|'light'}) => {
|
||||
const { dispatch,state} = useGlobalContext()
|
||||
const items = [
|
||||
{
|
||||
@@ -44,7 +44,7 @@ const LanguageSetting = () => {
|
||||
}
|
||||
}}
|
||||
>
|
||||
<Button className=" text-[#ffffffb3] hover:text-[#fff] border-none" type="default" ghost >
|
||||
<Button className={`border-none ${mode==='dark' ? "text-[#333] hover:text-[#333333b3]" : "text-[#ffffffb3] hover:text-[#fff] "}`} type="default" ghost >
|
||||
<span className='flex items-center gap-[8px]'> <Icon icon="ic:baseline-language" width="14" height="14"/>{langLabel}</span>
|
||||
</Button>
|
||||
</Dropdown>
|
||||
|
||||
@@ -8,6 +8,7 @@ import {useNavigate} from "react-router-dom";
|
||||
import Logo from '@common/assets/logo.png'
|
||||
import { $t } from "@common/locales";
|
||||
import { Icon } from "@iconify/react/dist/iconify.js";
|
||||
import LanguageSetting from "@common/components/aoplatform/LanguageSetting";
|
||||
|
||||
const Login:FC = ()=> {
|
||||
const {state, dispatch} = useGlobalContext()
|
||||
@@ -99,7 +100,8 @@ const Login:FC = ()=> {
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="h-full w-full flex bg-[#f5f7fa] items-center overflow-auto min-h-[490px]">
|
||||
<div className="h-full w-full flex flex-col bg-[#f5f7fa] items-center overflow-auto min-h-[490px]">
|
||||
<div className="w-full text-right pr-[40px]"><LanguageSetting mode="dark"/></div>
|
||||
<div className="w-[410px] mx-auto">
|
||||
<div className="mx-auto">
|
||||
<span className="flex items-center justify-center">
|
||||
|
||||
Reference in New Issue
Block a user