File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ export async function AppSidebar({ collections }: { collections: Collection[] })
2525 intent = "inset"
2626 className = "flex gap-y-12 p-0 py-6 group-[:not([data-sidebar-state=collapsed])]/sidebar-container:p-6"
2727 >
28- < SidebarHeader className = "border-border m-0 size-auto border-b pl-6" >
28+ { /* TODO: Make sidebar variations, so we won't need an important css flag */ }
29+ < SidebarHeader className = "border-border m-0 size-auto! border-b pl-6 h-auto! w-full!" >
2930 < div className = "flex h-[68px] items-center gap-x-4" >
3031 < div className = "bg-primary/15 dark:bg-primary/20 border-primary dark:border-primary/40 relative flex overflow-clip rounded-md border p-4" >
3132 < div className = "bg-primary/20 absolute -inset-x-[25%] inset-y-0 m-auto h-2 -translate-x-4 -translate-y-4 -rotate-45 blur-[3px]" />
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { AuthLayout } from './views/auth/layout'
1616import { LoginView } from './views/auth/login'
1717import { SignUpView } from './views/auth/sign-up'
1818import { CreateView } from './views/collections/create'
19+ import { HomeView } from './views/collections/home'
1920import { CollectionLayout } from './views/collections/layout'
2021import { ListView } from './views/collections/list'
2122import { OneView } from './views/collections/one'
@@ -76,6 +77,16 @@ export function defineNextJsServerConfig<
7677) : NextJsServerConfig < TFullSchema , TContext , TCollections , TApiRouter > {
7778 const radixRouter = createRouter < RouterData > ( )
7879
80+ radixRouter . insert ( '/collections' , {
81+ view ( args : { serverConfig : ServerConfig } ) {
82+ return (
83+ < CollectionLayout serverConfig = { args . serverConfig } >
84+ < HomeView serverConfig = { args . serverConfig } />
85+ </ CollectionLayout >
86+ )
87+ } ,
88+ } )
89+
7990 // Collection
8091 radixRouter . insert ( `/collections/:slug` , {
8192 requiredAuthentication : true ,
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ import 'server-only'
55 */
66import type { ServerConfig } from '@kivotos/core'
77
8- import { CollectionCard } from '../components/collection-card'
9- import { Typography } from '../components/primitives/typography'
8+ import { CollectionCard } from '../../ components/collection-card'
9+ import { Typography } from '../../ components/primitives/typography'
1010
1111const greeting = ( ) => {
1212 const time = new Date ( ) . getHours ( )
@@ -26,7 +26,7 @@ type HomepageProps = {
2626 serverConfig : ServerConfig
2727}
2828
29- export const HomePage = ( { serverConfig } : HomepageProps ) => {
29+ export const HomeView = ( { serverConfig } : HomepageProps ) => {
3030 const collections = serverConfig . collections . map ( ( col ) => col . slug )
3131
3232 return (
You can’t perform that action at this time.
0 commit comments