forked from elliotBraem/efizzybot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a4393a1
commit e57b612
Showing
12 changed files
with
215 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,5 @@ | |
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { defineConfig } from '@rsbuild/core' | ||
import { pluginReact } from '@rsbuild/plugin-react' | ||
import { TanStackRouterRspack } from '@tanstack/router-plugin/rspack' | ||
|
||
export default defineConfig({ | ||
plugins: [pluginReact()], | ||
html: { | ||
template: './index.html', | ||
}, | ||
tools: { | ||
rspack: { | ||
plugins: [TanStackRouterRspack()], | ||
}, | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,22 @@ | ||
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom"; | ||
import SubmissionList from "./components/SubmissionList"; | ||
import Settings from "./components/Settings"; | ||
import { LiveUpdateProvider } from "./contexts/LiveUpdateContext"; | ||
import LiveStatus from "./components/LiveStatus"; | ||
import { createRouter, RouterProvider } from "@tanstack/react-router"; | ||
|
||
function App() { | ||
return ( | ||
<LiveUpdateProvider> | ||
<Router> | ||
<div> | ||
<nav className="bg-white border-b-2 border-gray-800 p-6"> | ||
<div className="max-w-7xl mx-auto flex justify-between items-center"> | ||
<div className="flex items-center space-x-8"> | ||
<Link to="/" className="hover:text-gray-600 transition-colors"> | ||
<h1 className="text-2xl font-bold">Curation Bot</h1> | ||
</Link> | ||
</div> | ||
<div className="flex items-center gap-4"> | ||
<LiveStatus /> | ||
<Link | ||
to="/" | ||
className="hover:text-gray-600 font-medium transition-colors" | ||
> | ||
Submissions | ||
</Link> | ||
<Link | ||
to="/settings" | ||
className="hover:text-gray-600 font-medium transition-colors" | ||
> | ||
Settings | ||
</Link> | ||
</div> | ||
</div> | ||
</nav> | ||
import { routeTree } from "./routeTree.gen"; | ||
|
||
// Set up a Router instance | ||
const router = createRouter({ | ||
routeTree, | ||
defaultPreload: "intent", | ||
}); | ||
|
||
<div className="max-w-4xl mx-auto min-h-screen"> | ||
<Routes> | ||
<Route path="/" element={<SubmissionList />} /> | ||
<Route path="/settings" element={<Settings />} /> | ||
</Routes> | ||
</div> | ||
</div> | ||
</Router> | ||
</LiveUpdateProvider> | ||
); | ||
// Register things for typesafety | ||
declare module "@tanstack/react-router" { | ||
interface Register { | ||
router: typeof router; | ||
} | ||
} | ||
|
||
function App() { | ||
return <RouterProvider router={router} />; | ||
} | ||
|
||
export default App; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
/* eslint-disable */ | ||
|
||
// @ts-nocheck | ||
|
||
// noinspection JSUnusedGlobalSymbols | ||
|
||
// This file was automatically generated by TanStack Router. | ||
// 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 Routes | ||
|
||
import { Route as rootRoute } from './routes/__root' | ||
import { Route as SettingsImport } from './routes/settings' | ||
import { Route as IndexImport } from './routes/index' | ||
|
||
// Create/Update Routes | ||
|
||
const SettingsRoute = SettingsImport.update({ | ||
id: '/settings', | ||
path: '/settings', | ||
getParentRoute: () => rootRoute, | ||
} as any) | ||
|
||
const IndexRoute = IndexImport.update({ | ||
id: '/', | ||
path: '/', | ||
getParentRoute: () => rootRoute, | ||
} as any) | ||
|
||
// Populate the FileRoutesByPath interface | ||
|
||
declare module '@tanstack/react-router' { | ||
interface FileRoutesByPath { | ||
'/': { | ||
id: '/' | ||
path: '/' | ||
fullPath: '/' | ||
preLoaderRoute: typeof IndexImport | ||
parentRoute: typeof rootRoute | ||
} | ||
'/settings': { | ||
id: '/settings' | ||
path: '/settings' | ||
fullPath: '/settings' | ||
preLoaderRoute: typeof SettingsImport | ||
parentRoute: typeof rootRoute | ||
} | ||
} | ||
} | ||
|
||
// Create and export the route tree | ||
|
||
export interface FileRoutesByFullPath { | ||
'/': typeof IndexRoute | ||
'/settings': typeof SettingsRoute | ||
} | ||
|
||
export interface FileRoutesByTo { | ||
'/': typeof IndexRoute | ||
'/settings': typeof SettingsRoute | ||
} | ||
|
||
export interface FileRoutesById { | ||
__root__: typeof rootRoute | ||
'/': typeof IndexRoute | ||
'/settings': typeof SettingsRoute | ||
} | ||
|
||
export interface FileRouteTypes { | ||
fileRoutesByFullPath: FileRoutesByFullPath | ||
fullPaths: '/' | '/settings' | ||
fileRoutesByTo: FileRoutesByTo | ||
to: '/' | '/settings' | ||
id: '__root__' | '/' | '/settings' | ||
fileRoutesById: FileRoutesById | ||
} | ||
|
||
export interface RootRouteChildren { | ||
IndexRoute: typeof IndexRoute | ||
SettingsRoute: typeof SettingsRoute | ||
} | ||
|
||
const rootRouteChildren: RootRouteChildren = { | ||
IndexRoute: IndexRoute, | ||
SettingsRoute: SettingsRoute, | ||
} | ||
|
||
export const routeTree = rootRoute | ||
._addFileChildren(rootRouteChildren) | ||
._addFileTypes<FileRouteTypes>() | ||
|
||
/* ROUTE_MANIFEST_START | ||
{ | ||
"routes": { | ||
"__root__": { | ||
"filePath": "__root.tsx", | ||
"children": [ | ||
"/", | ||
"/settings" | ||
] | ||
}, | ||
"/": { | ||
"filePath": "index.tsx" | ||
}, | ||
"/settings": { | ||
"filePath": "settings.tsx" | ||
} | ||
} | ||
} | ||
ROUTE_MANIFEST_END */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Link, Outlet, createRootRoute } from "@tanstack/react-router"; | ||
import { TanStackRouterDevtools } from "@tanstack/router-devtools"; | ||
import LiveStatus from "../components/LiveStatus"; | ||
import { LiveUpdateProvider } from "../contexts/LiveUpdateContext"; | ||
|
||
export const Route = createRootRoute({ | ||
component: RootComponent, | ||
}); | ||
|
||
function RootComponent() { | ||
return ( | ||
<> | ||
<LiveUpdateProvider> | ||
<div> | ||
<nav className="bg-white border-b-2 border-gray-800 p-6"> | ||
<div className="max-w-7xl mx-auto flex justify-between items-center"> | ||
<div className="flex items-center space-x-8"> | ||
<Link to="/" className="hover:text-gray-600 transition-colors"> | ||
<h1 className="text-2xl font-bold">Curation Bot</h1> | ||
</Link> | ||
</div> | ||
<div className="flex items-center gap-4"> | ||
<LiveStatus /> | ||
<Link | ||
to="/" | ||
className="hover:text-gray-600 font-medium transition-colors" | ||
> | ||
Submissions | ||
</Link> | ||
<Link | ||
to="/settings" | ||
className="hover:text-gray-600 font-medium transition-colors" | ||
> | ||
Settings | ||
</Link> | ||
</div> | ||
</div> | ||
</nav> | ||
|
||
<div className="max-w-4xl mx-auto min-h-screen"> | ||
<Outlet /> | ||
</div> | ||
</div> | ||
</LiveUpdateProvider> | ||
<TanStackRouterDevtools position="bottom-right" /> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createFileRoute } from "@tanstack/react-router"; | ||
import SubmissionList from "../components/SubmissionList"; | ||
|
||
export const Route = createFileRoute("/")({ | ||
component: SubmissionList, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createFileRoute } from "@tanstack/react-router"; | ||
import Settings from "../components/Settings"; | ||
|
||
export const Route = createFileRoute("/settings")({ | ||
component: Settings, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.