updated UI, minor fixes

This commit is contained in:
lnn0q 2025-04-20 18:10:34 +03:00
parent b5280b70a1
commit 755c56ee8a
9 changed files with 175 additions and 98 deletions

View file

@ -8,130 +8,149 @@
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { createFileRoute } from '@tanstack/react-router';
import { createFileRoute } from '@tanstack/react-router'
// Import Routes
import { Route as rootRoute } from './pages/__root';
import { Route as RegisterImport } from './pages/register';
import { Route as LoginImport } from './pages/login';
import { Route as IndexImport } from './pages/index';
import { Route as rootRoute } from './pages/__root'
import { Route as RegisterImport } from './pages/register'
import { Route as LoginImport } from './pages/login'
import { Route as AboutImport } from './pages/about'
import { Route as IndexImport } from './pages/index'
// Create Virtual Routes
const BookLazyImport = createFileRoute('/book')();
const BookLazyImport = createFileRoute('/book')()
// Create/Update Routes
const BookLazyRoute = BookLazyImport.update({
id: '/book',
path: '/book',
getParentRoute: () => rootRoute
} as any).lazy(() => import('./pages/book.lazy').then(d => d.Route));
getParentRoute: () => rootRoute,
} as any).lazy(() => import('./pages/book.lazy').then((d) => d.Route))
const RegisterRoute = RegisterImport.update({
id: '/register',
path: '/register',
getParentRoute: () => rootRoute
} as any);
getParentRoute: () => rootRoute,
} as any)
const LoginRoute = LoginImport.update({
id: '/login',
path: '/login',
getParentRoute: () => rootRoute
} as any);
getParentRoute: () => rootRoute,
} as any)
const AboutRoute = AboutImport.update({
id: '/about',
path: '/about',
getParentRoute: () => rootRoute,
} as any)
const IndexRoute = IndexImport.update({
id: '/',
path: '/',
getParentRoute: () => rootRoute
} as any);
getParentRoute: () => rootRoute,
} as any)
// Populate the FileRoutesByPath interface
declare module '@tanstack/react-router' {
interface FileRoutesByPath {
'/': {
id: '/';
path: '/';
fullPath: '/';
preLoaderRoute: typeof IndexImport;
parentRoute: typeof rootRoute;
};
id: '/'
path: '/'
fullPath: '/'
preLoaderRoute: typeof IndexImport
parentRoute: typeof rootRoute
}
'/about': {
id: '/about'
path: '/about'
fullPath: '/about'
preLoaderRoute: typeof AboutImport
parentRoute: typeof rootRoute
}
'/login': {
id: '/login';
path: '/login';
fullPath: '/login';
preLoaderRoute: typeof LoginImport;
parentRoute: typeof rootRoute;
};
id: '/login'
path: '/login'
fullPath: '/login'
preLoaderRoute: typeof LoginImport
parentRoute: typeof rootRoute
}
'/register': {
id: '/register';
path: '/register';
fullPath: '/register';
preLoaderRoute: typeof RegisterImport;
parentRoute: typeof rootRoute;
};
id: '/register'
path: '/register'
fullPath: '/register'
preLoaderRoute: typeof RegisterImport
parentRoute: typeof rootRoute
}
'/book': {
id: '/book';
path: '/book';
fullPath: '/book';
preLoaderRoute: typeof BookLazyImport;
parentRoute: typeof rootRoute;
};
id: '/book'
path: '/book'
fullPath: '/book'
preLoaderRoute: typeof BookLazyImport
parentRoute: typeof rootRoute
}
}
}
// Create and export the route tree
export interface FileRoutesByFullPath {
'/': typeof IndexRoute;
'/login': typeof LoginRoute;
'/register': typeof RegisterRoute;
'/book': typeof BookLazyRoute;
'/': typeof IndexRoute
'/about': typeof AboutRoute
'/login': typeof LoginRoute
'/register': typeof RegisterRoute
'/book': typeof BookLazyRoute
}
export interface FileRoutesByTo {
'/': typeof IndexRoute;
'/login': typeof LoginRoute;
'/register': typeof RegisterRoute;
'/book': typeof BookLazyRoute;
'/': typeof IndexRoute
'/about': typeof AboutRoute
'/login': typeof LoginRoute
'/register': typeof RegisterRoute
'/book': typeof BookLazyRoute
}
export interface FileRoutesById {
__root__: typeof rootRoute;
'/': typeof IndexRoute;
'/login': typeof LoginRoute;
'/register': typeof RegisterRoute;
'/book': typeof BookLazyRoute;
__root__: typeof rootRoute
'/': typeof IndexRoute
'/about': typeof AboutRoute
'/login': typeof LoginRoute
'/register': typeof RegisterRoute
'/book': typeof BookLazyRoute
}
export interface FileRouteTypes {
fileRoutesByFullPath: FileRoutesByFullPath;
fullPaths: '/' | '/login' | '/register' | '/book';
fileRoutesByTo: FileRoutesByTo;
to: '/' | '/login' | '/register' | '/book';
id: '__root__' | '/' | '/login' | '/register' | '/book';
fileRoutesById: FileRoutesById;
fileRoutesByFullPath: FileRoutesByFullPath
fullPaths: '/' | '/about' | '/login' | '/register' | '/book'
fileRoutesByTo: FileRoutesByTo
to: '/' | '/about' | '/login' | '/register' | '/book'
id: '__root__' | '/' | '/about' | '/login' | '/register' | '/book'
fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
IndexRoute: typeof IndexRoute;
LoginRoute: typeof LoginRoute;
RegisterRoute: typeof RegisterRoute;
BookLazyRoute: typeof BookLazyRoute;
IndexRoute: typeof IndexRoute
AboutRoute: typeof AboutRoute
LoginRoute: typeof LoginRoute
RegisterRoute: typeof RegisterRoute
BookLazyRoute: typeof BookLazyRoute
}
const rootRouteChildren: RootRouteChildren = {
IndexRoute: IndexRoute,
AboutRoute: AboutRoute,
LoginRoute: LoginRoute,
RegisterRoute: RegisterRoute,
BookLazyRoute: BookLazyRoute
};
BookLazyRoute: BookLazyRoute,
}
export const routeTree = rootRoute
._addFileChildren(rootRouteChildren)
._addFileTypes<FileRouteTypes>();
._addFileTypes<FileRouteTypes>()
/* ROUTE_MANIFEST_START
{
@ -140,6 +159,7 @@ export const routeTree = rootRoute
"filePath": "__root.tsx",
"children": [
"/",
"/about",
"/login",
"/register",
"/book"
@ -148,6 +168,9 @@ export const routeTree = rootRoute
"/": {
"filePath": "index.tsx"
},
"/about": {
"filePath": "about.tsx"
},
"/login": {
"filePath": "login.tsx"
},