Upgrade design & moved backend here & login and settings work with api

This commit is contained in:
2024-09-29 18:04:41 +02:00
parent 42d3212624
commit f2d1eb4289
43 changed files with 1881 additions and 359 deletions
-34
View File
@@ -1,34 +0,0 @@
'use client';
import Link from 'next/link';
import config from './config';
import './styles.scss';
import { usePathname } from 'next/navigation';
const Navbar = () => {
const pathname = usePathname();
return (
<nav
className='navbar'
style={{
gridTemplateColumns: `repeat(${config.length}, 1fr)`,
}}
>
{config.map((element) => (
<Link
key={element.title}
href={element.link}
className={`navButton ${
element.link == pathname ? 'selected' : ''
}`}
>
{element.icon()}
<span className='navButtonLabel'>{element.title}</span>
</Link>
))}
</nav>
);
};
export default Navbar;
+46
View File
@@ -0,0 +1,46 @@
'use client';
// ---------------------------------------------------------------------------------------------------------------------
//! Imports
// ---------------------------------------------------------------------------------------------------------------------
// --------------------------------------------------- Components ------------------------------------------------------
import Link from 'next/link';
// ---------------------------------------------------------------------------------------------------------------------
// -------------------------------------------------- Hooks & Utils ----------------------------------------------------
import { usePathname } from 'next/navigation';
import config from './config';
// ---------------------------------------------------------------------------------------------------------------------
// ------------------------------------------------- Assets & Styles ---------------------------------------------------
import './styles.scss';
// ---------------------------------------------------------------------------------------------------------------------
const Navbar = () => {
const pathname = usePathname();
return (
<nav
className='navbar'
style={{
gridTemplateColumns: `repeat(${config.length}, 1fr)`,
}}
>
{config.map((element) => (
<Link
key={element.title}
href={element.link}
className={`navButton ${
element.link == pathname ? 'selected' : ''
}`}
>
{element.icon()}
<span className='navButtonLabel'>{element.title}</span>
</Link>
))}
</nav>
);
};
export default Navbar;