mirror of
https://github.com/D4M13N-D3V/neroshitron.git
synced 2025-03-14 10:05:04 +00:00
Update NavigationBar.tsx
This commit is contained in:
parent
2c036794ff
commit
b99f3fa256
@ -3,6 +3,7 @@
|
|||||||
import { createClient } from "@/utils/supabase/client";
|
import { createClient } from "@/utils/supabase/client";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
|
import { useRouter } from 'next/router';
|
||||||
|
|
||||||
|
|
||||||
export default async function AuthButton() {
|
export default async function AuthButton() {
|
||||||
@ -22,9 +23,9 @@ export default async function AuthButton() {
|
|||||||
|
|
||||||
|
|
||||||
// ...
|
// ...
|
||||||
const url = window.location.href;
|
|
||||||
const urlObj = new URL(url);
|
const router = useRouter();
|
||||||
const currentPage = urlObj.pathname;
|
const currentPage = router.pathname;
|
||||||
if(user){
|
if(user){
|
||||||
let email = user.email;
|
let email = user.email;
|
||||||
if(email != null){
|
if(email != null){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user