mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-04-04 07:46:16 +02:00
feat: add back to home link on standard header
This commit is contained in:
parent
5e584eb5d0
commit
ab4fcaa772
|
|
@ -4,6 +4,9 @@ import ChatButton from '~/components/chat/ChatButton'
|
||||||
import ChatModal from '~/components/chat/ChatModal'
|
import ChatModal from '~/components/chat/ChatModal'
|
||||||
import useServiceInstalledStatus from '~/hooks/useServiceInstalledStatus'
|
import useServiceInstalledStatus from '~/hooks/useServiceInstalledStatus'
|
||||||
import { SERVICE_NAMES } from '../../constants/service_names'
|
import { SERVICE_NAMES } from '../../constants/service_names'
|
||||||
|
import { Link } from '@inertiajs/react'
|
||||||
|
import { IconArrowLeft } from '@tabler/icons-react'
|
||||||
|
import classNames from 'classnames'
|
||||||
|
|
||||||
export default function AppLayout({ children }: { children: React.ReactNode }) {
|
export default function AppLayout({ children }: { children: React.ReactNode }) {
|
||||||
const [isChatOpen, setIsChatOpen] = useState(false)
|
const [isChatOpen, setIsChatOpen] = useState(false)
|
||||||
|
|
@ -11,6 +14,13 @@ export default function AppLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen flex flex-col">
|
<div className="min-h-screen flex flex-col">
|
||||||
|
{
|
||||||
|
window.location.pathname !== '/home' && (
|
||||||
|
<Link href="/home" className="absolute top-60 md:top-48 left-4 flex items-center">
|
||||||
|
<IconArrowLeft className="mr-2" size={24} />
|
||||||
|
<p className="text-lg text-gray-600">Back to Home</p>
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
<div
|
<div
|
||||||
className="p-2 flex gap-2 flex-col items-center justify-center cursor-pointer"
|
className="p-2 flex gap-2 flex-col items-center justify-center cursor-pointer"
|
||||||
onClick={() => (window.location.href = '/home')}
|
onClick={() => (window.location.href = '/home')}
|
||||||
|
|
@ -18,7 +28,11 @@ export default function AppLayout({ children }: { children: React.ReactNode }) {
|
||||||
<img src="/project_nomad_logo.png" alt="Project Nomad Logo" className="h-40 w-40" />
|
<img src="/project_nomad_logo.png" alt="Project Nomad Logo" className="h-40 w-40" />
|
||||||
<h1 className="text-5xl font-bold text-desert-green">Command Center</h1>
|
<h1 className="text-5xl font-bold text-desert-green">Command Center</h1>
|
||||||
</div>
|
</div>
|
||||||
<hr className="text-desert-green font-semibold h-[1.5px] bg-desert-green border-none" />
|
<hr className={
|
||||||
|
classNames(
|
||||||
|
"text-desert-green font-semibold h-[1.5px] bg-desert-green border-none",
|
||||||
|
window.location.pathname !== '/home' ? "mt-12 md:mt-0" : "mt-0"
|
||||||
|
)} />
|
||||||
<div className="flex-1 w-full bg-desert">{children}</div>
|
<div className="flex-1 w-full bg-desert">{children}</div>
|
||||||
<Footer />
|
<Footer />
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user