mirror of
https://github.com/Radiquum/AniX.git
synced 2025-09-06 06:23:53 +05:00
anix/fix: search in bookmarks, user collections, user favorites, user history
This commit is contained in:
parent
8d2800c2f2
commit
93205fdb4e
6 changed files with 55 additions and 19 deletions
19
app/pages/Discover.tsx
Normal file
19
app/pages/Discover.tsx
Normal file
|
@ -0,0 +1,19 @@
|
|||
"use client";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useUserStore } from "../store/auth";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
export const DiscoverPage = () => {
|
||||
const token = useUserStore((state) => state.token);
|
||||
const authState = useUserStore((state) => state.state);
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (authState === "finished" && !token) {
|
||||
router.push("/login?redirect=/discover");
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [authState, token]);
|
||||
|
||||
return <></>;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue