muitas melhorias pra descrever
This commit is contained in:
1 parent
89b08a19ef
commit
c8fba4d240
21 files changed
+971
-17
No files matched your search
@@ -1,9 +1,21 @@
|
||||
import { NavLink, Outlet } from "react-router-dom";
|
||||
import { useEffect } from "react";
|
||||
import { NavLink, Outlet, useLocation } from "react-router-dom";
|
||||
import { OnlineCounter } from "./OnlineCounter.js";
|
||||
import { CookieConsent } from "./CookieConsent.js";
|
||||
import { FeedbackWidget } from "./FeedbackWidget.js";
|
||||
import { trackVisit } from "../lib/analytics.js";
|
||||
|
||||
const linkClass = ({ isActive }: { isActive: boolean }) =>
|
||||
`px-3 py-1.5 rounded text-sm ${isActive ? "bg-accent text-white" : "text-slate-300 hover:bg-white/5"}`;
|
||||
|
||||
export function Layout() {
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
trackVisit(location.pathname);
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [location.pathname]);
|
||||
|
||||
return (
|
||||
<div className="h-[100dvh] flex flex-col">
|
||||
<header className="flex items-center gap-2 sm:gap-4 px-2 sm:px-4 py-2 border-b border-white/10 bg-panel overflow-x-auto">
|
||||
@@ -24,6 +36,7 @@ export function Layout() {
|
||||
Quiz
|
||||
</NavLink>
|
||||
</nav>
|
||||
<OnlineCounter />
|
||||
<a
|
||||
href="https://github.com/LluisV/Z-Anatomy-Sample"
|
||||
target="_blank"
|
||||
@@ -36,6 +49,8 @@ export function Layout() {
|
||||
<main className="flex-1 min-h-0">
|
||||
<Outlet />
|
||||
</main>
|
||||
<FeedbackWidget />
|
||||
<CookieConsent />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user