feat(api): add react-query client generation and redesign api responses
This commit is contained in:
parent
28aa8d3a82
commit
535dbddbc6
12 changed files with 2026 additions and 119 deletions
|
@ -1,12 +1,17 @@
|
|||
"use client";
|
||||
|
||||
import { RedirectButton } from '@/components/user/redirect-button';
|
||||
import { ThemePicker } from '@/components/user/theme-picker';
|
||||
import { useGetApiUserMe } from '@/generated/api/default/default';
|
||||
|
||||
export default function Home() {
|
||||
const { data, isLoading } = useGetApiUserMe();
|
||||
|
||||
return (
|
||||
<div className='flex flex-col items-center justify-center h-screen'>
|
||||
<div className='absolute top-4 right-4'>{<ThemePicker />}</div>
|
||||
<div>
|
||||
<h1>Home</h1>
|
||||
<h1>Hello {isLoading ? 'Loading...' : data?.data.user?.name || 'Unknown User'}</h1>
|
||||
<RedirectButton redirectUrl='/logout' buttonText='Logout' />
|
||||
<RedirectButton redirectUrl='/settings' buttonText='Settings' />
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue