@@ -24,19 +24,7 @@ import {
24
24
import NextLink from "next/link" ;
25
25
import SchoolOfCodeLogo from "./SchoolOfCodeLogo" ;
26
26
import { useRouter } from "next/router" ;
27
- // import { getCsrfToken, signIn, signOut, useSession } from "next-auth/react";
28
- // import { api } from '@/utils/api'
29
- // SIWE Integration
30
- // import { SiweMessage } from "siwe";
31
- // import {
32
- // useAccount,
33
- // useConnect,
34
- // useDisconnect,
35
- // useSignMessage,
36
- // useNetwork,
37
- // } from "wagmi";
38
- // import { InjectedConnector } from "wagmi/connectors/injected";
39
- // import { useEffect, useState } from "react";
27
+
40
28
import { ConnectButton } from "@rainbow-me/rainbowkit" ;
41
29
42
30
interface NavItem {
@@ -65,69 +53,6 @@ export default function Topbar() {
65
53
const { isOpen, onToggle } = useDisclosure ( ) ;
66
54
const router = useRouter ( ) ;
67
55
68
- // Hooks
69
- // const { data: sessionData } = useSession();
70
- // const { data: secretMessage } = api.example.getSecretMessage.useQuery(
71
- // undefined, // no input
72
- // { enabled: sessionData?.user !== undefined }
73
- // );
74
- // State
75
- // const [showConnection, setShowConnection] = useState(false);
76
-
77
- // Wagmi Hooks
78
- // const { signMessageAsync } = useSignMessage();
79
- // const { address, isConnected } = useAccount();
80
- // const { connect } = useConnect({
81
- // connector: new InjectedConnector(),
82
- // });
83
- // const { disconnect } = useDisconnect();
84
- // const { chain } = useNetwork();
85
-
86
- // Functions
87
- /**
88
- * Attempts SIWE and establish session
89
- */
90
- // const onClickSignIn = async () => {
91
- // try {
92
- // const message = new SiweMessage({
93
- // domain: window.location.host,
94
- // address: address,
95
- // statement: "Sign in with Ethereum to the app.",
96
- // uri: window.location.origin,
97
- // version: "1",
98
- // chainId: chain?.id,
99
- // // nonce is used from CSRF token
100
- // nonce: await getCsrfToken(),
101
- // });
102
- // const signature = await signMessageAsync({
103
- // message: message.prepareMessage(),
104
- // });
105
- // await signIn("credentials", {
106
- // message: JSON.stringify(message),
107
- // redirect: false,
108
- // signature,
109
- // });
110
- // } catch (error) {
111
- // window.alert(error);
112
- // }
113
- // };
114
-
115
- /**
116
- * Sign user out
117
- */
118
- // const onClickSignOut = async () => {
119
- // await signOut();
120
- // };
121
-
122
- // Hooks
123
- /**
124
- * Handles hydration issue
125
- * only show after the window has finished loading
126
- */
127
- // useEffect(() => {
128
- // setShowConnection(true);
129
- // }, []);
130
-
131
56
return (
132
57
< Box
133
58
as = "header"
0 commit comments