change to router

This commit is contained in:
2026-02-18 00:51:39 +08:00
parent d88056bf3c
commit ebd8a7e8be
55 changed files with 3422 additions and 5160 deletions

View File

@@ -1,21 +1,9 @@
'use client';
import { QueryClient } from '@kevisual/query'
export const getUrl = () => {
if (typeof window === 'undefined') return '/client/router';
const _url = new URL(location.href)
const pathname = _url.pathname
const [user, repo] = pathname.split('/').filter(Boolean)
if (repo === 'v1') {
return '/' + pathname;
}
return '/client/router'
}
import { QueryClient } from '@kevisual/query';
export const query = new QueryClient({
url: '/api/router',
});
export const queryClient = new QueryClient({
url: getUrl(),
url: '/client/router',
});