d46191789d
- LoginPage: centred landing layout with logo placeholder box and business name headline (BUSINESS_NAME constant); registration link removed - useAuth: post-login redirect goes to / (dashboard) directly - Nav: Home | Apps | Settings | Logout (consistent on all protected pages) - AppsPage, SettingsPage: white placeholder pages with headline - App.tsx: /apps and /settings private routes; removed /register, /register-success, /login-success; catch-all → / - Deleted: RegisterPage, RegisterSuccessPage, LoginSuccessPage - Backend /api/auth/register kept for future admin-side user creation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
583 B
TypeScript
27 lines
583 B
TypeScript
import { Link } from "react-router-dom";
|
|
import { useAuth } from "../hooks/useAuth";
|
|
|
|
export default function Nav() {
|
|
const { logout } = useAuth();
|
|
|
|
return (
|
|
<nav style={{
|
|
display: "flex",
|
|
alignItems: "center",
|
|
gap: 16,
|
|
padding: "12px 24px",
|
|
borderBottom: "1px solid #ccc",
|
|
}}>
|
|
<Link to="/">Home</Link>
|
|
<Link to="/apps">Apps</Link>
|
|
<Link to="/settings">Settings</Link>
|
|
<button
|
|
onClick={logout}
|
|
style={{ marginLeft: "auto", cursor: "pointer" }}
|
|
>
|
|
Logout
|
|
</button>
|
|
</nav>
|
|
);
|
|
}
|