implemented post management dashboard and started work on projects

This commit is contained in:
2024-06-02 00:58:11 +02:00
parent 8c56a9421e
commit a0a938021d
29 changed files with 969 additions and 595 deletions
@@ -0,0 +1,33 @@
import './sidebar.css'
import { Button, NavLink } from 'react-bootstrap';
import { SidebarEntry } from '@/app/admin/page';
import React, { ReactNode, useState } from 'react';
import Link from 'next/link';
import { headers } from 'next/headers';
type Props = {
children?:ReactNode;
sidebarEntries:Array<SidebarEntry>;
slug:string
}
export default async function Sidebar(props:Props){
return (
<div className='w-fit h[100%]'>
<ul className={`navbar-light bg-light nav nav-pills flex-column mb-auto container-fluid h-[100%] items-start justify-start p-0 w-fit`}>
{props.sidebarEntries.map((sidebarEntry)=>{
return <li key={sidebarEntry.view} className='nav-item w-[100%]'><Link className={`nav-link m-2 whitespace-nowrap outline outline-1 ${(props.slug == sidebarEntry.view) ? 'active' : ''}`} href={`/admin/${sidebarEntry.view}`}>
{sidebarEntry.label}
</Link></li>
})}
</ul>
</div>
);
}