Added dashboard route
parent
97c4aac3c9
commit
6bf1d46955
@ -0,0 +1,11 @@
|
|||||||
|
export default function DashboardLayout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<section className='flex flex-col items-center justify-center gap-4 py-8 md:py-10'>
|
||||||
|
{children}
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
'use client'
|
||||||
|
|
||||||
|
import { Card, CardHeader, CardBody, CardFooter } from '@nextui-org/card'
|
||||||
|
import { Link } from '@nextui-org/link'
|
||||||
|
import { Divider } from '@nextui-org/divider'
|
||||||
|
import { Image } from '@nextui-org/image'
|
||||||
|
|
||||||
|
const handleClick = (url: string) => {
|
||||||
|
console.log(url)
|
||||||
|
// open(url, '_blank')
|
||||||
|
getData()
|
||||||
|
}
|
||||||
|
|
||||||
|
const getData = async () => {
|
||||||
|
const res = await fetch('/api/bruh')
|
||||||
|
|
||||||
|
console.log(res)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function DashboardPage() {
|
||||||
|
const data = [
|
||||||
|
{
|
||||||
|
name: 'NextUI',
|
||||||
|
link: 'nextui.org',
|
||||||
|
description:
|
||||||
|
'Make beautiful websites regardless of your design experience.',
|
||||||
|
url: 'https://github.com/nextui-org/nextui',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NextUI',
|
||||||
|
link: 'nextui.org',
|
||||||
|
description:
|
||||||
|
'Make beautiful websites regardless of your design experience.',
|
||||||
|
url: 'https://github.com/nextui-org/nextui',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NextUI',
|
||||||
|
link: 'nextui.org',
|
||||||
|
description:
|
||||||
|
'Make beautiful websites regardless of your design experience.',
|
||||||
|
url: 'https://github.com/nextui-org/nextui',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NextUI',
|
||||||
|
link: 'nextui.org',
|
||||||
|
description:
|
||||||
|
'Make beautiful websites regardless of your design experience.',
|
||||||
|
url: 'https://github.com/nextui-org/nextui',
|
||||||
|
},
|
||||||
|
]
|
||||||
|
return (
|
||||||
|
<div className='mt-4 flex w-full max-w-4xl flex-row flex-wrap justify-center gap-6'>
|
||||||
|
{data.map((data, index) => (
|
||||||
|
<Card
|
||||||
|
className='max-w-[400px]'
|
||||||
|
key={index}
|
||||||
|
isPressable
|
||||||
|
onPress={() => handleClick(data.url)}>
|
||||||
|
<CardHeader className='flex gap-3'>
|
||||||
|
<Image
|
||||||
|
alt='nextui logo'
|
||||||
|
height={40}
|
||||||
|
radius='sm'
|
||||||
|
src='https://avatars.githubusercontent.com/u/86160567?s=200&v=4'
|
||||||
|
width={40}
|
||||||
|
/>
|
||||||
|
<div className='flex flex-col items-start'>
|
||||||
|
<p className='text-md'>{data.name}</p>
|
||||||
|
<p className='text-small text-default-500'>
|
||||||
|
{data.link}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</CardHeader>
|
||||||
|
<Divider />
|
||||||
|
<CardBody>
|
||||||
|
<p>{data.description}</p>
|
||||||
|
</CardBody>
|
||||||
|
<Divider />
|
||||||
|
<CardFooter>
|
||||||
|
<Link
|
||||||
|
isExternal
|
||||||
|
showAnchorIcon
|
||||||
|
href={data.url}>
|
||||||
|
{data.url}
|
||||||
|
</Link>
|
||||||
|
</CardFooter>
|
||||||
|
</Card>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
@ -1,69 +1,74 @@
|
|||||||
export type SiteConfig = typeof siteConfig;
|
export type SiteConfig = typeof siteConfig
|
||||||
|
|
||||||
export const siteConfig = {
|
export const siteConfig = {
|
||||||
name: "Next.js + NextUI",
|
name: 'Next.js + NextUI',
|
||||||
description: "Make beautiful websites regardless of your design experience.",
|
description:
|
||||||
|
'Make beautiful websites regardless of your design experience.',
|
||||||
navItems: [
|
navItems: [
|
||||||
{
|
{
|
||||||
label: "Home",
|
label: 'Home',
|
||||||
href: "/",
|
href: '/',
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// label: 'Docs',
|
||||||
|
// href: '/docs',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: 'Pricing',
|
||||||
|
// href: '/pricing',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: 'Blog',
|
||||||
|
// href: '/blog',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// label: 'About',
|
||||||
|
// href: '/about',
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
label: "Docs",
|
label: 'Dashboard',
|
||||||
href: "/docs",
|
href: '/dashboard',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
label: "Pricing",
|
|
||||||
href: "/pricing",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "Blog",
|
|
||||||
href: "/blog",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "About",
|
|
||||||
href: "/about",
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
navMenuItems: [
|
navMenuItems: [
|
||||||
{
|
{
|
||||||
label: "Profile",
|
label: 'Profile',
|
||||||
href: "/profile",
|
href: '/profile',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Dashboard",
|
label: 'Dashboard',
|
||||||
href: "/dashboard",
|
href: '/dashboard',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Projects",
|
label: 'Projects',
|
||||||
href: "/projects",
|
href: '/projects',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Team",
|
label: 'Team',
|
||||||
href: "/team",
|
href: '/team',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Calendar",
|
label: 'Calendar',
|
||||||
href: "/calendar",
|
href: '/calendar',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Settings",
|
label: 'Settings',
|
||||||
href: "/settings",
|
href: '/settings',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Help & Feedback",
|
label: 'Help & Feedback',
|
||||||
href: "/help-feedback",
|
href: '/help-feedback',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Logout",
|
label: 'Logout',
|
||||||
href: "/logout",
|
href: '/logout',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
links: {
|
links: {
|
||||||
github: "https://github.com/nextui-org/nextui",
|
github: 'https://github.com/TZGyn/',
|
||||||
twitter: "https://twitter.com/getnextui",
|
twitter: 'https://twitter.com/getnextui',
|
||||||
docs: "https://nextui-docs-v2.vercel.app",
|
docs: 'https://nextui-docs-v2.vercel.app',
|
||||||
discord: "https://discord.gg/9b6yyZKmH4",
|
discord: 'https://discord.gg/9b6yyZKmH4',
|
||||||
sponsor: "https://patreon.com/jrgarciadev"
|
sponsor: 'https://patreon.com/jrgarciadev',
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue