quivr/frontend/app/config/components/UserAccountSection.tsx
Zineb El Bachiri 9c8e0aa0e4
Feat/multiple brains frontend (#344)
* 🗑️ remove date input from fetch_user_id_from_credentials

* ♻️ refactor backend utils by splitting it into files

* 💡 comments for next actions to update /upload

* 🚚 move SupabaseProvider tp libs

* 🚚 move useAxios to hooks

* ♻️ refacto brain routes

* 🚨 update lintermfor paths

*  new brain context provider

*  new brain component in navbar

* 🚨 fix linter and async

* 🇸🇪 add feature flag for multiple-brains
2023-06-20 16:17:13 +02:00

37 lines
935 B
TypeScript

/* eslint-disable */
"use client";
import Link from "next/link";
import Button from "@/lib/components/ui/Button";
import { useSupabase } from "@/lib/context/SupabaseProvider";
export const UserAccountSection = (): JSX.Element => {
const { session } = useSupabase();
if (session === null) {
return <></>;
}
return (
<>
<div className="border-b border-gray-300 mt-8 mb-8">
<p className="text-center text-gray-600 uppercase tracking-wide font-semibold">
Your Account
</p>
</div>
<div className="flex justify-between items-center w-full">
<span>
Signed In as: <b>{session.user.email}</b>
</span>
<Link className="mt-2" href={"/logout"}>
<Button className="px-3 py-2" variant={"danger"}>
Logout
</Button>
</Link>
{/* TODO: add functionality to change password */}
</div>
</>
);
};