mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
/api/client 아래의 Endpoint들을 tRPC로 마이그레이션
This commit is contained in:
@@ -14,7 +14,7 @@ const createClient = (fetch: typeof globalThis.fetch) =>
|
||||
|
||||
let browserClient: ReturnType<typeof createClient>;
|
||||
|
||||
export const trpc = (fetch = globalThis.fetch) => {
|
||||
export const useTRPC = (fetch = globalThis.fetch) => {
|
||||
const client = browserClient ?? createClient(fetch);
|
||||
if (browser) {
|
||||
browserClient ??= client;
|
||||
|
||||
Reference in New Issue
Block a user