Atproto AMA app
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 37 lines 953 B view raw
1import { A, createAsync } from "@solidjs/router"; 2import { Show, Suspense } from "solid-js"; 3 4import { getCurrentUser } from "~/lib/queries"; 5 6import styles from "./Header.module.css"; 7 8export function Header() { 9 const user = createAsync(() => getCurrentUser()); 10 11 return ( 12 <header class={styles.bar}> 13 <A class={styles.brand} href="/"> 14 Askimut 15 </A> 16 <Suspense fallback={null}> 17 <Show when={user()} keyed> 18 {(u) => ( 19 <div class={styles.right}> 20 <span class={styles.handle}>@{u.handle}</span> 21 <a 22 class={styles.signOut} 23 href="/oauth/logout" 24 onClick={(e) => { 25 e.preventDefault(); 26 window.location.href = "/oauth/logout"; 27 }} 28 > 29 Sign out 30 </a> 31 </div> 32 )} 33 </Show> 34 </Suspense> 35 </header> 36 ); 37}