File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
components/NavbarComponents Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,19 @@ const AuthButtons = () => {
1818 fetchUser ( ) ;
1919 } , [ supabase . auth ] ) ;
2020
21+ const handleLogout = async ( ) => {
22+ const { error } = await supabase . auth . signOut ( ) ;
23+ if ( ! error ) setUser ( null ) ;
24+ else throw error ;
25+ } ;
26+
2127 return (
2228 < div >
2329 { user ? (
24- < button className = "hidden sm:flex text-xs border border-emerald-500 dark:border-purple-500 px-3 py-1.5 rounded-md hover:bg-emerald-100 dark:hover:bg-violet-900 transition-colors duration-200 items-center gap-1.5" >
30+ < button
31+ onClick = { handleLogout }
32+ className = "hidden sm:flex text-xs border border-emerald-500 dark:border-purple-500 px-3 py-1.5 rounded-md hover:bg-emerald-100 dark:hover:bg-violet-900 transition-colors duration-200 items-center gap-1.5"
33+ >
2534 < span > Logout</ span >
2635 { ! loading && (
2736 < span className = "text-xs opacity-70" > { `(${ user } )` } </ span >
Original file line number Diff line number Diff line change 11import type { NextConfig } from "next" ;
22
33const nextConfig : NextConfig = {
4- /* config options here */
4+ images : {
5+ remotePatterns : [ new URL ( "https://img.icons8.com/**" ) ] ,
6+ } ,
57} ;
68
79export default nextConfig ;
You can’t perform that action at this time.
0 commit comments