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 = {
|
||||
name: "Next.js + NextUI",
|
||||
description: "Make beautiful websites regardless of your design experience.",
|
||||
name: 'Next.js + NextUI',
|
||||
description:
|
||||
'Make beautiful websites regardless of your design experience.',
|
||||
navItems: [
|
||||
{
|
||||
label: "Home",
|
||||
href: "/",
|
||||
label: 'Home',
|
||||
href: '/',
|
||||
},
|
||||
// {
|
||||
// label: 'Docs',
|
||||
// href: '/docs',
|
||||
// },
|
||||
// {
|
||||
// label: 'Pricing',
|
||||
// href: '/pricing',
|
||||
// },
|
||||
// {
|
||||
// label: 'Blog',
|
||||
// href: '/blog',
|
||||
// },
|
||||
// {
|
||||
// label: 'About',
|
||||
// href: '/about',
|
||||
// },
|
||||
{
|
||||
label: 'Dashboard',
|
||||
href: '/dashboard',
|
||||
},
|
||||
{
|
||||
label: "Docs",
|
||||
href: "/docs",
|
||||
},
|
||||
{
|
||||
label: "Pricing",
|
||||
href: "/pricing",
|
||||
},
|
||||
{
|
||||
label: "Blog",
|
||||
href: "/blog",
|
||||
},
|
||||
{
|
||||
label: "About",
|
||||
href: "/about",
|
||||
}
|
||||
],
|
||||
navMenuItems: [
|
||||
{
|
||||
label: "Profile",
|
||||
href: "/profile",
|
||||
label: 'Profile',
|
||||
href: '/profile',
|
||||
},
|
||||
{
|
||||
label: "Dashboard",
|
||||
href: "/dashboard",
|
||||
label: 'Dashboard',
|
||||
href: '/dashboard',
|
||||
},
|
||||
{
|
||||
label: "Projects",
|
||||
href: "/projects",
|
||||
label: 'Projects',
|
||||
href: '/projects',
|
||||
},
|
||||
{
|
||||
label: "Team",
|
||||
href: "/team",
|
||||
label: 'Team',
|
||||
href: '/team',
|
||||
},
|
||||
{
|
||||
label: "Calendar",
|
||||
href: "/calendar",
|
||||
label: 'Calendar',
|
||||
href: '/calendar',
|
||||
},
|
||||
{
|
||||
label: "Settings",
|
||||
href: "/settings",
|
||||
label: 'Settings',
|
||||
href: '/settings',
|
||||
},
|
||||
{
|
||||
label: "Help & Feedback",
|
||||
href: "/help-feedback",
|
||||
label: 'Help & Feedback',
|
||||
href: '/help-feedback',
|
||||
},
|
||||
{
|
||||
label: "Logout",
|
||||
href: "/logout",
|
||||
label: 'Logout',
|
||||
href: '/logout',
|
||||
},
|
||||
],
|
||||
links: {
|
||||
github: "https://github.com/nextui-org/nextui",
|
||||
twitter: "https://twitter.com/getnextui",
|
||||
docs: "https://nextui-docs-v2.vercel.app",
|
||||
discord: "https://discord.gg/9b6yyZKmH4",
|
||||
sponsor: "https://patreon.com/jrgarciadev"
|
||||
github: 'https://github.com/TZGyn/',
|
||||
twitter: 'https://twitter.com/getnextui',
|
||||
docs: 'https://nextui-docs-v2.vercel.app',
|
||||
discord: 'https://discord.gg/9b6yyZKmH4',
|
||||
sponsor: 'https://patreon.com/jrgarciadev',
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@ -1,42 +1,49 @@
|
||||
{
|
||||
"name": "next-app-template",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nextui-org/button": "2.0.0",
|
||||
"@nextui-org/code": "2.0.0",
|
||||
"@nextui-org/input": "2.0.0",
|
||||
"@nextui-org/kbd": "2.0.0",
|
||||
"@nextui-org/link": "2.0.0",
|
||||
"@nextui-org/navbar": "2.0.0",
|
||||
"@nextui-org/snippet": "2.0.0",
|
||||
"@nextui-org/switch": "2.0.0",
|
||||
"@nextui-org/system": "2.0.0",
|
||||
"@nextui-org/theme": "2.0.0",
|
||||
"@react-aria/visually-hidden": "^3.8.1",
|
||||
"@react-aria/ssr": "^3.6.0",
|
||||
"@types/node": "20.2.5",
|
||||
"@types/react": "18.2.8",
|
||||
"@types/react-dom": "18.2.4",
|
||||
"autoprefixer": "10.4.14",
|
||||
"clsx": "^1.2.1",
|
||||
"eslint": "8.41.0",
|
||||
"eslint-config-next": "13.4.4",
|
||||
"framer-motion": "^10.12.16",
|
||||
"intl-messageformat": "^10.1.0",
|
||||
"next": "13.4.9",
|
||||
"next-themes": "^0.2.1",
|
||||
"postcss": "8.4.24",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"tailwind-variants": "^0.1.13",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "5.0.4"
|
||||
}
|
||||
"name": "next-app-template",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nextui-org/button": "2.0.0",
|
||||
"@nextui-org/card": "^2.0.4",
|
||||
"@nextui-org/code": "2.0.0",
|
||||
"@nextui-org/divider": "^2.0.4",
|
||||
"@nextui-org/image": "^2.0.4",
|
||||
"@nextui-org/input": "2.0.0",
|
||||
"@nextui-org/kbd": "2.0.0",
|
||||
"@nextui-org/link": "2.0.0",
|
||||
"@nextui-org/navbar": "2.0.0",
|
||||
"@nextui-org/snippet": "2.0.0",
|
||||
"@nextui-org/switch": "2.0.0",
|
||||
"@nextui-org/system": "2.0.0",
|
||||
"@nextui-org/theme": "2.0.0",
|
||||
"@react-aria/ssr": "^3.6.0",
|
||||
"@react-aria/visually-hidden": "^3.8.1",
|
||||
"@types/node": "20.2.5",
|
||||
"@types/react": "18.2.8",
|
||||
"@types/react-dom": "18.2.4",
|
||||
"autoprefixer": "10.4.14",
|
||||
"clsx": "^1.2.1",
|
||||
"eslint": "8.41.0",
|
||||
"eslint-config-next": "13.4.4",
|
||||
"framer-motion": "^10.12.16",
|
||||
"intl-messageformat": "^10.1.0",
|
||||
"next": "13.4.9",
|
||||
"next-themes": "^0.2.1",
|
||||
"postcss": "8.4.24",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"tailwind-variants": "^0.1.13",
|
||||
"tailwindcss": "3.3.2",
|
||||
"typescript": "5.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"prettier": "^3.0.1",
|
||||
"prettier-plugin-tailwindcss": "^0.4.1"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue