a tool for shared writing and social publishing
at feature/reader 27 lines 714 B view raw
1"use client"; 2 3import { ActionButton } from "components/ActionBar/ActionButton"; 4import { Menu, MenuItem } from "components/Layout"; 5import { mutate } from "swr"; 6import { AccountSmall } from "components/Icons/AccountSmall"; 7import { LogoutSmall } from "components/Icons/LogoutSmall"; 8 9// it was going have a popover with a log out button 10export const AccountSettings = () => { 11 return ( 12 <Menu 13 asChild 14 trigger={<ActionButton icon=<AccountSmall /> label="Settings" />} 15 > 16 <MenuItem 17 onSelect={async () => { 18 await fetch("/api/auth/logout"); 19 mutate("identity", null); 20 }} 21 > 22 <LogoutSmall /> 23 Logout 24 </MenuItem> 25 </Menu> 26 ); 27};