add new features and format
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import { createRouter, createRootRoute, createRoute } from '@tanstack/react-router';
|
||||
import { Root } from './routes/root';
|
||||
import { Album } from './routes/album';
|
||||
import { Artist } from './routes/artist';
|
||||
import { Track } from './routes/track';
|
||||
import { Home } from './routes/home';
|
||||
import { Config } from './routes/config';
|
||||
import { Playlist } from './routes/playlist';
|
||||
import { History } from './routes/history';
|
||||
import { Watchlist } from './routes/watchlist';
|
||||
import { createRouter, createRootRoute, createRoute } from "@tanstack/react-router";
|
||||
import { Root } from "./routes/root";
|
||||
import { Album } from "./routes/album";
|
||||
import { Artist } from "./routes/artist";
|
||||
import { Track } from "./routes/track";
|
||||
import { Home } from "./routes/home";
|
||||
import { Config } from "./routes/config";
|
||||
import { Playlist } from "./routes/playlist";
|
||||
import { History } from "./routes/history";
|
||||
import { Watchlist } from "./routes/watchlist";
|
||||
|
||||
const rootRoute = createRootRoute({
|
||||
component: Root,
|
||||
@@ -15,49 +15,49 @@ const rootRoute = createRootRoute({
|
||||
|
||||
const indexRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/',
|
||||
path: "/",
|
||||
component: Home,
|
||||
});
|
||||
|
||||
const albumRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/album/$albumId',
|
||||
path: "/album/$albumId",
|
||||
component: Album,
|
||||
});
|
||||
|
||||
const artistRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/artist/$artistId',
|
||||
path: "/artist/$artistId",
|
||||
component: Artist,
|
||||
});
|
||||
|
||||
const trackRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/track/$trackId',
|
||||
path: "/track/$trackId",
|
||||
component: Track,
|
||||
});
|
||||
|
||||
const configRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/config',
|
||||
path: "/config",
|
||||
component: Config,
|
||||
});
|
||||
|
||||
const playlistRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/playlist/$playlistId',
|
||||
path: "/playlist/$playlistId",
|
||||
component: Playlist,
|
||||
});
|
||||
|
||||
const historyRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/history',
|
||||
path: "/history",
|
||||
component: History,
|
||||
});
|
||||
|
||||
const watchlistRoute = createRoute({
|
||||
getParentRoute: () => rootRoute,
|
||||
path: '/watchlist',
|
||||
path: "/watchlist",
|
||||
component: Watchlist,
|
||||
});
|
||||
|
||||
@@ -74,7 +74,7 @@ const routeTree = rootRoute.addChildren([
|
||||
|
||||
export const router = createRouter({ routeTree });
|
||||
|
||||
declare module '@tanstack/react-router' {
|
||||
declare module "@tanstack/react-router" {
|
||||
interface Register {
|
||||
router: typeof router;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user