mirror of
https://github.com/Radiquum/AniX.git
synced 2025-04-05 07:44:38 +00:00
14 lines
No EOL
305 B
JavaScript
14 lines
No EOL
305 B
JavaScript
"use client"
|
|
import { useRouter } from "next/navigation";
|
|
import { getJWT } from "../api/utils";
|
|
|
|
export default function myProfile() {
|
|
const user = getJWT()
|
|
const router = useRouter()
|
|
|
|
if (!user) {
|
|
return router.push("/login")
|
|
} else {
|
|
return router.push(`/profile/${user.user_id}`)
|
|
}
|
|
} |