featL settings, view routes, embeds, etc.

This commit is contained in:
diced
2023-07-20 12:35:08 -07:00
parent 5f295924b9
commit 0670cbb586
26 changed files with 1604 additions and 210 deletions

View File

@@ -0,0 +1,14 @@
import useSWR from 'swr';
const f = async () => {
const res = await fetch('/api/user/avatar');
if (!res.ok) return null;
const r = await res.text();
return r;
};
export default function useAvatar() {
const { data, mutate } = useSWR('/api/user/avatar', f);
return { avatar: data, mutate };
}