rc
This commit is contained in:
parent
fb84464d67
commit
bb16fb9162
|
|
@ -40,7 +40,8 @@ export default function DashboardPage() {
|
|||
}
|
||||
if(ready){
|
||||
if(username == "-1"){
|
||||
router.push("/logincomplete");
|
||||
console.log(user?.id);
|
||||
router.push("/logincomplete");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,18 +1,24 @@
|
|||
import { usePrivy } from "@privy-io/react-auth";
|
||||
import Head from "next/head";
|
||||
import { useRouter } from "next/router";
|
||||
import { SetStateAction, useState } from "react";
|
||||
import { SetStateAction, useEffect, useState } from "react";
|
||||
|
||||
export default function LoginComplete() {
|
||||
const [username, setUsername] = useState("");
|
||||
const [error, setError] = useState("");
|
||||
const {ready, user} = usePrivy();
|
||||
const {ready, user,authenticated} = usePrivy();
|
||||
const router = useRouter();
|
||||
const handleUsernameChange = (e: { target: { value: SetStateAction<string>; }; }) => {
|
||||
setUsername(e.target.value);
|
||||
setError("");
|
||||
};
|
||||
|
||||
useEffect(()=>{
|
||||
if (ready && !authenticated) {
|
||||
router.push("/");
|
||||
}
|
||||
},[ready, user])
|
||||
|
||||
const handleClaim = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user