You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.7 KiB

  1. import ApplicationLogo from '@/Components/ApplicationLogo';
  2. import NavLink from '@/Components/NavLink';
  3. import Footer from '@/Components/Footer';
  4. import { Link, usePage } from '@inertiajs/react';
  5. import { PropsWithChildren } from 'react';
  6. export default function Guest({ children }: PropsWithChildren) {
  7. const { url } = usePage();
  8. return (
  9. <div>
  10. <header className="navbar px-4 bg-primary-background border-b-2 border-secondary-main">
  11. <div id="ProjectTitle" className="navbar-start">
  12. <Link href="/">
  13. <ApplicationLogo />
  14. </Link>
  15. </div>
  16. <nav className="navbar-end">
  17. <ul className="menu menu-horizontal px-1">
  18. <li><NavLink href="/" active={url === '/'}>
  19. Home
  20. </NavLink></li>
  21. <li><NavLink href="/about" active={url === '/about'}>
  22. About
  23. </NavLink></li>
  24. <li><NavLink href={route('login')}
  25. active={url === '/login'}
  26. >
  27. Log in
  28. </NavLink></li>
  29. <li><NavLink href={route('register')}
  30. active={url === '/register'}
  31. >
  32. Register
  33. </NavLink></li>
  34. </ul>
  35. </nav>
  36. </header>
  37. <main>
  38. {children}
  39. </main>
  40. <footer>
  41. <Footer />
  42. </footer>
  43. </div>
  44. );
  45. }