-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge ; commit 'eb15d86a4bd9caf53ead16fa441c9d199da9174e'
- Loading branch information
Showing
21 changed files
with
1,230 additions
and
141 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
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,14 +1,4 @@ | ||
# Yarn's manifest file. You can configure yarn here. | ||
# See https://yarnpkg.com/configuration/yarnrc. | ||
|
||
# For `node_modules` (see `nodeLinker` below), this is almost always the preferred option. | ||
compressionLevel: 0 | ||
|
||
enableGlobalCache: true | ||
|
||
# Lets yarn use hardlinks inside `node_modules` to dedupe packages. | ||
# For a more pnpm-like experience, consider `hardlinks-global` where hardlinks point to a global store. | ||
nmMode: hardlinks-local | ||
|
||
# How to install Node packages. | ||
nodeLinker: node-modules |
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,13 +1,16 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>React App</title> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.tsx"></script> | ||
</body> | ||
<html lang="en" data-theme="mine"> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>React App</title> | ||
</head> | ||
|
||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,19 +12,26 @@ | |
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"@tanstack/router-devtools": "^1.26.1", | ||
"@tanstack/router-vite-plugin": "^1.25.0", | ||
"@types/node": "^20.12.2", | ||
"@types/react": "^18.2.37", | ||
"@types/react-dom": "^18.2.15", | ||
"@vitejs/plugin-react": "^4.2.0", | ||
"autoprefixer": "^10.4.19", | ||
"daisyui": "^4.9.0", | ||
"postcss": "^8.4.38", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"tailwindcss": "^3.4.3", | ||
"typescript": "^5.2.2", | ||
"vite": "^5.2.6", | ||
"autoprefixer": "^10.4.19", | ||
"postcss": "^8.4.38", | ||
"tailwindcss": "^3.4.3" | ||
"vite": "^5.2.6" | ||
}, | ||
"engines": { | ||
"node": "=20.x" | ||
}, | ||
"packageManager": "[email protected]" | ||
"packageManager": "[email protected]", | ||
"dependencies": { | ||
"@tanstack/react-router": "^1.26.1" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,17 @@ | ||
import { Link } from "@tanstack/react-router"; | ||
|
||
type NavLinkProps = { | ||
children: React.ReactNode, | ||
to: string | ||
} | ||
|
||
export default function NavLink({ children, to }: NavLinkProps) { | ||
return ( | ||
<Link | ||
activeProps={{ | ||
className: "bg-accent" | ||
}} | ||
className="btn btn-ghost text-xl" | ||
to={to}>{children}</Link> | ||
) | ||
} |
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
File renamed without changes.
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,9 +1,24 @@ | ||
import React from 'react' | ||
import ReactDOM from 'react-dom/client' | ||
import App from '@/App' | ||
import "@/index.css"; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')).render( | ||
import { RouterProvider, createRouter } from '@tanstack/react-router'; | ||
|
||
import { routeTree } from '@/routeTree.gen'; | ||
|
||
const router = createRouter({ | ||
routeTree, | ||
defaultPreload: 'intent', | ||
}) | ||
|
||
declare module '@tanstack/react-router' { | ||
interface Register { | ||
router: typeof router | ||
} | ||
}; | ||
|
||
ReactDOM.createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<App /> | ||
<RouterProvider router={router} /> | ||
</React.StrictMode> | ||
) | ||
) |
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
Empty file.
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 @@ | ||
export default function SudokuGamePage() { | ||
return ( | ||
<div className="container"> | ||
</div> | ||
) | ||
} |
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,56 @@ | ||
/* prettier-ignore-start */ | ||
|
||
/* eslint-disable */ | ||
|
||
// @ts-nocheck | ||
|
||
// noinspection JSUnusedGlobalSymbols | ||
|
||
// This file is auto-generated by TanStack Router | ||
|
||
import { createFileRoute } from '@tanstack/react-router' | ||
|
||
// Import Routes | ||
|
||
import { Route as rootRoute } from './routes/__root' | ||
|
||
// Create Virtual Routes | ||
|
||
const SudokuLazyImport = createFileRoute('/sudoku')() | ||
const IndexLazyImport = createFileRoute('/')() | ||
|
||
// Create/Update Routes | ||
|
||
const SudokuLazyRoute = SudokuLazyImport.update({ | ||
path: '/sudoku', | ||
getParentRoute: () => rootRoute, | ||
} as any).lazy(() => import('./routes/sudoku.lazy').then((d) => d.Route)) | ||
|
||
const IndexLazyRoute = IndexLazyImport.update({ | ||
path: '/', | ||
getParentRoute: () => rootRoute, | ||
} as any).lazy(() => import('./routes/index.lazy').then((d) => d.Route)) | ||
|
||
// Populate the FileRoutesByPath interface | ||
|
||
declare module '@tanstack/react-router' { | ||
interface FileRoutesByPath { | ||
'/': { | ||
preLoaderRoute: typeof IndexLazyImport | ||
parentRoute: typeof rootRoute | ||
} | ||
'/sudoku': { | ||
preLoaderRoute: typeof SudokuLazyImport | ||
parentRoute: typeof rootRoute | ||
} | ||
} | ||
} | ||
|
||
// Create and export the route tree | ||
|
||
export const routeTree = rootRoute.addChildren([ | ||
IndexLazyRoute, | ||
SudokuLazyRoute, | ||
]) | ||
|
||
/* prettier-ignore-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,30 @@ | ||
import { createRootRoute, Outlet } from "@tanstack/react-router"; | ||
import { TanStackRouterDevtools } from "@tanstack/router-devtools"; | ||
|
||
import NavLink from "@/components/NavLink"; | ||
|
||
export const Route = createRootRoute({ | ||
component: Root, | ||
notFoundComponent: NotFound | ||
}); | ||
|
||
function NotFound() { | ||
return ( | ||
<p>Not Found (on root route)</p> | ||
) | ||
} | ||
|
||
function Root() { | ||
return ( | ||
<> | ||
<div className="navbar bg-neutral text-blue-200"> | ||
<NavLink to="/">TicTacToe</NavLink> | ||
<NavLink to="/sudoku">Sudoku</NavLink> | ||
</div > | ||
|
||
<hr /> | ||
<Outlet /> | ||
<TanStackRouterDevtools /> | ||
</> | ||
) | ||
} |
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 { createLazyFileRoute } from '@tanstack/react-router'; | ||
import HomePage from "@/pages/HomePage"; | ||
|
||
export const Route = createLazyFileRoute('/')({ | ||
component: HomePage, | ||
}) |
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 { createLazyFileRoute } from '@tanstack/react-router'; | ||
import SudokuGamePage from "@/pages/SudokuGamePage"; | ||
|
||
export const Route = createLazyFileRoute('/sudoku')({ | ||
component: SudokuGamePage, | ||
}) |
Oops, something went wrong.