Skip to content

Commit

Permalink
fex setCookie
Browse files Browse the repository at this point in the history
  • Loading branch information
mayfwl committed Sep 20, 2024
1 parent 9858d1f commit 702f5bd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/components/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import { getClientConfig } from "../config/client";
import LeftIcon from "@/app/icons/left.svg";
import { safeLocalStorage } from "@/app/utils";

const storage = safeLocalStorage();
export function AuthPage() {
const navigate = useNavigate();
const accessStore = useAccessStore();

const goHome = () => navigate(Path.Home);
const goChat = () => navigate(Path.Chat);
const goSaas = () => {
Expand Down Expand Up @@ -113,7 +113,6 @@ export function AuthPage() {
function TopBanner() {
const [isHovered, setIsHovered] = useState(false);
const [isVisible, setIsVisible] = useState(true);
const storage = safeLocalStorage();

useEffect(() => {
// 检查 localStorage 中是否有标记
Expand All @@ -127,7 +126,7 @@ function TopBanner() {
// 如果标记为 "true",则隐藏横幅
setIsVisible(false);
}
}, [storage]);
}, []);

const handleMouseEnter = () => {
setIsHovered(true);
Expand Down

0 comments on commit 702f5bd

Please sign in to comment.