File tree 3 files changed +29
-4
lines changed
components/NavBar/components/NavItems
3 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { useSupabase } from "@/app/supabase-provider";
3
3
import { cn } from "@/lib/utils" ;
4
4
import Link from "next/link" ;
5
5
import { Dispatch , FC , HTMLAttributes , SetStateAction } from "react" ;
6
- import { MdSettings } from "react-icons/md" ;
6
+ import { MdPerson , MdSettings } from "react-icons/md" ;
7
7
import Button from "../../../ui/Button" ;
8
8
import { AuthButtons } from "./components/AuthButtons" ;
9
9
import { DarkModeToggle } from "./components/DarkModeToggle" ;
@@ -54,13 +54,14 @@ export const NavItems: FC<NavItemsProps> = ({
54
54
< div className = "flex sm:flex-1 sm:justify-end flex-col items-center justify-center sm:flex-row gap-5 sm:gap-2" >
55
55
{ isUserLoggedIn && (
56
56
< >
57
- < Link href = { "/logout " } >
58
- < Button variant = { "secondary" } > Logout </ Button >
57
+ < Link aria-label = "account" className = "" href = { "/user " } >
58
+ < MdPerson / >
59
59
</ Link >
60
60
< Link href = { "/config" } >
61
61
< Button
62
62
variant = { "tertiary" }
63
63
className = "focus:outline-none text-2xl"
64
+ aria-label = "Settings"
64
65
>
65
66
< MdSettings />
66
67
</ Button >
Original file line number Diff line number Diff line change 5
5
anthropicModels ,
6
6
models ,
7
7
} from "@/lib/context/BrainConfigProvider/types" ;
8
+ import Link from "next/link" ;
8
9
import Button from "../components/ui/Button" ;
9
10
import Field from "../components/ui/Field" ;
10
11
import { useSupabase } from "../supabase-provider" ;
@@ -157,6 +158,22 @@ export default function ExplorePage() {
157
158
Done
158
159
</ Button >
159
160
</ div >
161
+ < div className = "border-b border-gray-300 mt-8 mb-8" >
162
+ < p className = "text-center text-gray-600 uppercase tracking-wide font-semibold" >
163
+ Your Account
164
+ </ p >
165
+ </ div >
166
+ < div className = "flex justify-between items-center w-full" >
167
+ < span >
168
+ Signed In as: < b > { session . user . email } </ b >
169
+ </ span >
170
+ < Link className = "mt-2" href = { "/logout" } >
171
+ < Button className = "px-3 py-2" variant = { "danger" } >
172
+ Logout
173
+ </ Button >
174
+ </ Link >
175
+ { /* TODO: add functionality to change password */ }
176
+ </ div >
160
177
</ form >
161
178
</ section >
162
179
</ main >
Original file line number Diff line number Diff line change 1
1
"use client" ;
2
+ import Button from "@/app/components/ui/Button" ;
2
3
import { cn } from "@/lib/utils" ;
4
+ import Link from "next/link" ;
3
5
import prettyBytes from "pretty-bytes" ;
4
6
import { HTMLAttributes } from "react" ;
5
7
import { UserStats } from "../types" ;
@@ -14,11 +16,16 @@ export const UserStatistics = (userStats: UserStats): JSX.Element => {
14
16
return (
15
17
< >
16
18
< div className = "flex flex-col sm:flex-row sm:items-center py-10 gap-5" >
17
- < div className = "flex-1" >
19
+ < div className = "flex-1 flex flex-col " >
18
20
< h1 className = "text-4xl font-semibold" >
19
21
{ email . split ( "@" ) [ 0 ] + "'" } s Brain Usage
20
22
</ h1 >
21
23
< p className = "opacity-50" > { email } </ p >
24
+ < Link className = "mt-2" href = { "/logout" } >
25
+ < Button className = "px-3 py-2" variant = { "danger" } >
26
+ Logout
27
+ </ Button >
28
+ </ Link >
22
29
</ div >
23
30
24
31
< BrainConsumption { ...userStats } />
You can’t perform that action at this time.
0 commit comments