WIP 2.0.0: React Compiler lint rules back to errors; docs
- The 192 places the rules flagged are fixed and the rules are errors again (npx eslint src: nothing). lib/hooks.ts: useStateSync (state that follows other state, set while rendering), useExternalEffect (API loads and browser reads), useNow; lib/navigation.ts hardNavigate for full reloads after sign-out or identity switches; other pages use the router. Resets moved into the handlers that cause them. - The banner shows and hides at its times on open pages. - HANDOVER, roadmap, README, FEATURES, SETTINGS, CHANGELOG updated; 2.0.0 section drafted in WHATS-NEW. e2e 102/102 (PayFast sandbox skipped); production build passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import { usePathname } from "next/navigation";
|
||||
import { useAuth } from "@/hooks/useAuth";
|
||||
import { Home, Calendar, Phone, LogIn, UserPlus, LayoutDashboard, LogOut } from "lucide-react";
|
||||
import { useBrandColorVar } from "@/lib/theme";
|
||||
import { hardNavigate } from "@/lib/navigation";
|
||||
|
||||
export const BottomNav = () => {
|
||||
const { user, loading: authLoading, logout } = useAuth();
|
||||
@@ -15,7 +16,7 @@ export const BottomNav = () => {
|
||||
|
||||
const handleLogout = () => {
|
||||
logout();
|
||||
window.location.href = "/";
|
||||
hardNavigate("/"); // a full load, so nothing of the old session stays in memory
|
||||
};
|
||||
|
||||
const isActive = (href: string) => {
|
||||
|
||||
@@ -9,6 +9,7 @@ import { BottomNav } from "./BottomNav";
|
||||
import churchLogo from "@/app/church_logo.jpg";
|
||||
import { appName } from "@/lib/siteConfig";
|
||||
import { resolveToApiOrigin } from "@/lib/api";
|
||||
import { hardNavigate } from "@/lib/navigation";
|
||||
|
||||
type NavLink = {
|
||||
href: string;
|
||||
@@ -31,7 +32,7 @@ export const Navbar = () => {
|
||||
|
||||
const handleLogout = () => {
|
||||
logout();
|
||||
window.location.href = "/";
|
||||
hardNavigate("/"); // a full load, so nothing of the old session stays in memory
|
||||
};
|
||||
|
||||
const navLinks: NavLink[] = [
|
||||
|
||||
Reference in New Issue
Block a user