feat(MED-161): delete unused loader
This commit is contained in:
@@ -1,22 +0,0 @@
|
|||||||
import { cache } from 'react';
|
|
||||||
|
|
||||||
import { createAccountsApi } from '@kit/accounts/api';
|
|
||||||
import { UserAnalysis } from '@kit/accounts/types/accounts';
|
|
||||||
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
|
||||||
|
|
||||||
export type UserAnalyses = Awaited<ReturnType<typeof loadUserAnalyses>>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @name loadUserAnalyses
|
|
||||||
* @description
|
|
||||||
* Load the user's analyses. It's a cached per-request function that fetches the user workspace data.
|
|
||||||
* It can be used across the server components to load the user workspace data.
|
|
||||||
*/
|
|
||||||
export const loadUserAnalyses = cache(analysesLoader);
|
|
||||||
|
|
||||||
async function analysesLoader(): Promise<UserAnalysis | null> {
|
|
||||||
const client = getSupabaseServerClient();
|
|
||||||
const api = createAccountsApi(client);
|
|
||||||
|
|
||||||
return api.getUserAnalyses();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user