mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-18 07:24:07 +01:00
remove codemirror dep and restructure a bit
This commit is contained in:
@@ -15,26 +15,6 @@ import { useOsInfo } from '../hooks/useOsInfo';
|
||||
import { jotaiStore } from '../lib/jotai';
|
||||
import { queryClient } from '../lib/queryClient';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const TanStackRouterDevtools =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? () => null // Render nothing in production
|
||||
: React.lazy(() =>
|
||||
import('@tanstack/router-devtools').then((res) => ({
|
||||
default: res.TanStackRouterDevtools,
|
||||
})),
|
||||
);
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const ReactQueryDevtools =
|
||||
process.env.NODE_ENV === 'production'
|
||||
? () => null // Render nothing in production
|
||||
: React.lazy(() =>
|
||||
import('@tanstack/react-query-devtools').then((res) => ({
|
||||
default: res.ReactQueryDevtools,
|
||||
})),
|
||||
);
|
||||
|
||||
export const Route = createRootRoute({
|
||||
component: RouteComponent,
|
||||
errorComponent: RouteError,
|
||||
@@ -66,8 +46,6 @@ function RouteComponent() {
|
||||
</HelmetProvider>
|
||||
</MotionConfig>
|
||||
</LazyMotion>
|
||||
{/*<ReactQueryDevtools initialIsOpen />*/}
|
||||
{/*<TanStackRouterDevtools initialIsOpen />*/}
|
||||
</QueryClientProvider>
|
||||
</JotaiProvider>
|
||||
);
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
import { createFileRoute } from '@tanstack/react-router'
|
||||
import Settings from '../../../components/Settings/Settings'
|
||||
import { SettingsTab } from '../../../components/Settings/SettingsTab'
|
||||
import { createFileRoute } from '@tanstack/react-router';
|
||||
import type { SettingsTab } from '../../../components/Settings/Settings';
|
||||
import Settings from '../../../components/Settings/Settings';
|
||||
|
||||
interface SettingsSearchSchema {
|
||||
tab?: SettingsTab
|
||||
tab?: SettingsTab;
|
||||
}
|
||||
|
||||
export const Route = createFileRoute('/workspaces/$workspaceId/settings')({
|
||||
component: RouteComponent,
|
||||
validateSearch: (search: Record<string, unknown>): SettingsSearchSchema => ({
|
||||
tab: (search.tab ?? SettingsTab.General) as SettingsTab,
|
||||
tab: (search.tab ?? 'general') as SettingsTab,
|
||||
}),
|
||||
})
|
||||
});
|
||||
|
||||
function RouteComponent() {
|
||||
return <Settings />
|
||||
return <Settings />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user