-
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.
- Loading branch information
Showing
10 changed files
with
106 additions
and
12 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,35 @@ | ||
import { Link } from '@tanstack/react-router'; | ||
|
||
import { PACKS } from '../config'; | ||
|
||
export const PackSidebar = () => { | ||
return ( | ||
<div className="w-full max-w-sm h-full border-r border-neutral-200 bg-neutral-50"> | ||
<ul> | ||
{Object.entries(PACKS).map(([packId, pack]) => ( | ||
<li key={packId} className=""> | ||
<Link | ||
href={'/pack/$packId'} | ||
params={{ packId }} | ||
className="flex items-center gap-2 border-b border-neutral-200 px-4 py-2 hover:bg-neutral-100" | ||
> | ||
{pack.cover && ( | ||
<img | ||
src={pack.cover} | ||
className="w-10 h-10 rounded-sm" | ||
alt={pack.name} | ||
/> | ||
)} | ||
<div className="flex-1"> | ||
<div className="font-semibold">{pack.name}</div> | ||
<div className="text-neutral-600"> | ||
{pack.description} | ||
</div> | ||
</div> | ||
</Link> | ||
</li> | ||
))} | ||
</ul> | ||
</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,17 @@ | ||
type Pack = { | ||
name: string; | ||
description: string; | ||
cover?: string; | ||
}; | ||
|
||
export const PACKS: Record<string, Pack> = { | ||
activate_windows: { | ||
name: 'Activate Windows', | ||
description: 'Your license has expired.', | ||
cover: '/public/pack_activate_windows.png', | ||
}, | ||
duitsland: { | ||
name: 'Duitsland', | ||
description: 'Manderscheid 2024 Samples', | ||
}, | ||
}; |
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
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,17 @@ | ||
import { createRootRoute, Outlet } from '@tanstack/react-router'; | ||
|
||
import { Navbar } from '../components/Navbar'; | ||
import { PackSidebar } from '../components/PackSidebar'; | ||
|
||
export const Route = createRootRoute({ | ||
component: () => ( | ||
<> | ||
<div className="w-full h-screen flex flex-col"> | ||
<Navbar /> | ||
<Outlet /> | ||
<div className="grow h-full overflow-y-auto flex"> | ||
<PackSidebar /> | ||
<Outlet /> | ||
</div> | ||
{/* <TanStackRouterDevtools /> */} | ||
</> | ||
</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,14 @@ | ||
import { createFileRoute } from '@tanstack/react-router'; | ||
|
||
export const Route = createFileRoute('/pack/$packId/')({ | ||
component: (parameters) => { | ||
console.log(parameters); | ||
const { packId } = Route.useParams(); | ||
|
||
return ( | ||
<div> | ||
<div>Hello /pack/$packId/! {packId}!</div> | ||
</div> | ||
); | ||
}, | ||
}); |