feat(client): add storybook and workbench profile flow

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2026-01-31 12:29:35 +08:00
parent 6ea414bc88
commit 635b0fbb73
31 changed files with 1946 additions and 134 deletions

View File

@@ -1,5 +1,8 @@
import { useSuspenseQuery } from '@tanstack/react-query';
import { getUserInfoOptions } from '@/client/@tanstack/react-query.gen';
import {
getUserInfoByUserIdOptions,
getUserInfoOptions,
} from '@/client/@tanstack/react-query.gen';
export function useUserInfo() {
return useSuspenseQuery({
@@ -7,3 +10,11 @@ export function useUserInfo() {
staleTime: 10 * 60 * 1000,
});
}
export function useOtherUserInfo(userId: string) {
return useSuspenseQuery({
...getUserInfoByUserIdOptions({ path: { user_id: userId } }),
staleTime: 10 * 60 * 1000,
retry: (_failureCount, error) => error.code !== 403,
});
}