Compare commits

..

No commits in common. '4f0cfae03bd499f11b172c9cc1e67230b1bd4a30' and 'befe4ac37fbb31e4568912a8952a700c60cb4548' have entirely different histories.

@ -1,2 +1 @@
DATABASE_URL=postgres://postgres:password@127.0.0.1:5432/next-dashboard DATABASE_URL=postgres://postgres:password@127.0.0.1:5432/next-dashboard
ENVIRONMENT=prod

@ -8,16 +8,6 @@ Showcase: [website](https://next-dashboard.tzgyn.com) hosted on linode using doc
- [Postgres](https://www.postgresql.org/) - [Postgres](https://www.postgresql.org/)
- [Docker](https://www.docker.com/) to self host - [Docker](https://www.docker.com/) to self host
## Environments
Copy .env.example to .env.local before building
```bash
DATABASE_URL=postgres://{postgres}:{password}@127.0.0.1:5432/next-dashboard
ENVIRONMENT=prod
```
# Next.js & NextUI Template # Next.js & NextUI Template
This is a template for creating applications using Next.js 13 (app directory) and NextUI (v2). This is a template for creating applications using Next.js 13 (app directory) and NextUI (v2).

@ -1,14 +1,6 @@
'use client' 'use client'
import { import {
Avatar,
AvatarIcon,
Button,
Dropdown,
DropdownMenu,
DropdownItem,
DropdownTrigger,
Link,
Navbar as NextUINavbar, Navbar as NextUINavbar,
NavbarContent, NavbarContent,
NavbarMenu, NavbarMenu,
@ -16,7 +8,16 @@ import {
NavbarBrand, NavbarBrand,
NavbarItem, NavbarItem,
NavbarMenuItem, NavbarMenuItem,
} from '@nextui-org/react' } from '@nextui-org/navbar'
import {
Dropdown,
DropdownMenu,
DropdownItem,
DropdownTrigger,
} from '@nextui-org/dropdown'
import { Avatar, AvatarIcon } from '@nextui-org/avatar'
import { Link } from '@nextui-org/link'
import { Button } from '@nextui-org/react'
import { link as linkStyles } from '@nextui-org/theme' import { link as linkStyles } from '@nextui-org/theme'
@ -69,15 +70,10 @@ export const Navbar = ({
icon={'mdi:bookmark-box'} icon={'mdi:bookmark-box'}
fontSize={32} fontSize={32}
/> />
<p className='font-bold text-inherit'>Dashboard</p>
</NextLink> </NextLink>
</NavbarBrand> </NavbarBrand>
{siteConfig.navItems.map((item) => { {siteConfig.navItems.map((item) => (
if (
pathname.startsWith('/dashboard') &&
item.label === 'Dashboard'
)
return
return (
<NavbarItem <NavbarItem
key={item.href} key={item.href}
className='hidden sm:flex'> className='hidden sm:flex'>
@ -91,8 +87,7 @@ export const Navbar = ({
{item.label} {item.label}
</NextLink> </NextLink>
</NavbarItem> </NavbarItem>
) ))}
})}
{pathname.startsWith('/dashboard') && ( {pathname.startsWith('/dashboard') && (
<NavbarItem className='hidden sm:flex'> <NavbarItem className='hidden sm:flex'>
<Dropdown> <Dropdown>
@ -161,23 +156,23 @@ export const Navbar = ({
<NavbarMenu> <NavbarMenu>
<div className='mx-4 mt-2 flex flex-col gap-2'> <div className='mx-4 mt-2 flex flex-col gap-2'>
{siteConfig.navMenuItems.map((item, index) => { {siteConfig.navMenuItems.map((item, index) => (
if (
pathname.startsWith('/dashboard') &&
item.label === 'Dashboard'
)
return
return (
<NavbarMenuItem key={`${item}-${index}`}> <NavbarMenuItem key={`${item}-${index}`}>
<Link <Link
color={'foreground'} color={
index === 2
? 'primary'
: index ===
siteConfig.navMenuItems.length - 1
? 'danger'
: 'foreground'
}
href={item.href} href={item.href}
size='lg'> size='lg'>
{item.label} {item.label}
</Link> </Link>
</NavbarMenuItem> </NavbarMenuItem>
) ))}
})}
{pathname.startsWith('/dashboard') && {pathname.startsWith('/dashboard') &&
categories.length > 0 && categories.length > 0 &&
categories.map((category) => ( categories.map((category) => (

Loading…
Cancel
Save