fex setCookie
This commit is contained in:
parent
9858d1f958
commit
702f5bd362
app/components
|
@ -13,10 +13,10 @@ import { getClientConfig } from "../config/client";
|
||||||
import LeftIcon from "@/app/icons/left.svg";
|
import LeftIcon from "@/app/icons/left.svg";
|
||||||
import { safeLocalStorage } from "@/app/utils";
|
import { safeLocalStorage } from "@/app/utils";
|
||||||
|
|
||||||
|
const storage = safeLocalStorage();
|
||||||
export function AuthPage() {
|
export function AuthPage() {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const accessStore = useAccessStore();
|
const accessStore = useAccessStore();
|
||||||
|
|
||||||
const goHome = () => navigate(Path.Home);
|
const goHome = () => navigate(Path.Home);
|
||||||
const goChat = () => navigate(Path.Chat);
|
const goChat = () => navigate(Path.Chat);
|
||||||
const goSaas = () => {
|
const goSaas = () => {
|
||||||
|
@ -113,7 +113,6 @@ export function AuthPage() {
|
||||||
function TopBanner() {
|
function TopBanner() {
|
||||||
const [isHovered, setIsHovered] = useState(false);
|
const [isHovered, setIsHovered] = useState(false);
|
||||||
const [isVisible, setIsVisible] = useState(true);
|
const [isVisible, setIsVisible] = useState(true);
|
||||||
const storage = safeLocalStorage();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// 检查 localStorage 中是否有标记
|
// 检查 localStorage 中是否有标记
|
||||||
|
@ -127,7 +126,7 @@ function TopBanner() {
|
||||||
// 如果标记为 "true",则隐藏横幅
|
// 如果标记为 "true",则隐藏横幅
|
||||||
setIsVisible(false);
|
setIsVisible(false);
|
||||||
}
|
}
|
||||||
}, [storage]);
|
}, []);
|
||||||
|
|
||||||
const handleMouseEnter = () => {
|
const handleMouseEnter = () => {
|
||||||
setIsHovered(true);
|
setIsHovered(true);
|
||||||
|
|
Loading…
Reference in New Issue