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,30 +70,24 @@ 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 ( <NavbarItem
pathname.startsWith('/dashboard') && key={item.href}
item.label === 'Dashboard' className='hidden sm:flex'>
) <NextLink
return className={clsx(
return ( linkStyles({ color: 'foreground' }),
<NavbarItem 'data-[active=true]:font-medium data-[active=true]:text-primary'
key={item.href} )}
className='hidden sm:flex'> color='foreground'
<NextLink href={item.href}>
className={clsx( {item.label}
linkStyles({ color: 'foreground' }), </NextLink>
'data-[active=true]:font-medium data-[active=true]:text-primary' </NavbarItem>
)} ))}
color='foreground'
href={item.href}>
{item.label}
</NextLink>
</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 ( <NavbarMenuItem key={`${item}-${index}`}>
pathname.startsWith('/dashboard') && <Link
item.label === 'Dashboard' color={
) index === 2
return ? 'primary'
return ( : index ===
<NavbarMenuItem key={`${item}-${index}`}> siteConfig.navMenuItems.length - 1
<Link ? 'danger'
color={'foreground'} : 'foreground'
href={item.href} }
size='lg'> href={item.href}
{item.label} size='lg'>
</Link> {item.label}
</NavbarMenuItem> </Link>
) </NavbarMenuItem>
})} ))}
{pathname.startsWith('/dashboard') && {pathname.startsWith('/dashboard') &&
categories.length > 0 && categories.length > 0 &&
categories.map((category) => ( categories.map((category) => (

Loading…
Cancel
Save