mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-27 00:52:50 +00:00
remove auth
This commit is contained in:
@@ -4,7 +4,8 @@ import { useEffect, useState } from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
import { useBookingStore } from '@/lib/booking-store';
|
||||
import { UserPlus, LogIn, ChevronLeft } from 'lucide-react';
|
||||
import { UserPlus, ChevronLeft } from 'lucide-react';
|
||||
// import { LogIn } from 'lucide-react'; // TODO: re-enable auth — used by commented-out SignIn/Register button
|
||||
|
||||
function Tooltip({ children, content }: { children: React.ReactNode; content: string[] }) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
@@ -95,6 +96,7 @@ export default function AuthCheckPage() {
|
||||
</button>
|
||||
</Tooltip>
|
||||
|
||||
{/* TODO: re-enable auth — SignIn or Register button commented out until auth integration
|
||||
<Tooltip content={[
|
||||
'Saved passenger details',
|
||||
'View booking history',
|
||||
@@ -108,6 +110,7 @@ export default function AuthCheckPage() {
|
||||
SignIn or Register
|
||||
</button>
|
||||
</Tooltip>
|
||||
*/}
|
||||
</div>
|
||||
|
||||
<div className="mt-8 text-center">
|
||||
|
||||
@@ -192,20 +192,22 @@ export default function AppSidebar() {
|
||||
)}
|
||||
</div>
|
||||
) : (
|
||||
<div className="flex items-center gap-2 px-1 pt-1">
|
||||
<Link
|
||||
href="/login"
|
||||
className="flex-1 text-center px-3 py-2 text-sm font-medium text-gray-100 hover:bg-white/10 rounded-lg transition-colors"
|
||||
>
|
||||
Sign in
|
||||
</Link>
|
||||
<Link
|
||||
href="/register"
|
||||
className="flex-1 text-center px-3 py-2 text-sm font-medium bg-white text-[rgb(20_113_76)] hover:bg-gray-100 rounded-lg transition-colors"
|
||||
>
|
||||
Register
|
||||
</Link>
|
||||
</div>
|
||||
// TODO: re-enable auth — Sign in / Register links commented out until auth integration
|
||||
// <div className="flex items-center gap-2 px-1 pt-1">
|
||||
// <Link
|
||||
// href="/login"
|
||||
// className="flex-1 text-center px-3 py-2 text-sm font-medium text-gray-100 hover:bg-white/10 rounded-lg transition-colors"
|
||||
// >
|
||||
// Sign in
|
||||
// </Link>
|
||||
// <Link
|
||||
// href="/register"
|
||||
// className="flex-1 text-center px-3 py-2 text-sm font-medium bg-white text-[rgb(20_113_76)] hover:bg-gray-100 rounded-lg transition-colors"
|
||||
// >
|
||||
// Register
|
||||
// </Link>
|
||||
// </div>
|
||||
null
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
'use client';
|
||||
|
||||
import { Home, Phone, Ticket, User } from 'lucide-react';
|
||||
import { Home, Phone, Ticket } from 'lucide-react';
|
||||
// import { User } from 'lucide-react'; // TODO: re-enable auth — used by commented-out Sign in tab
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { useAuthStore } from '@/lib/auth-store';
|
||||
// import { useAuthStore } from '@/lib/auth-store'; // TODO: re-enable auth
|
||||
|
||||
// The linear, one-screen-at-a-time booking flow — each of these pages already
|
||||
// has its own sticky mobile CTA bar (and the mobile step strip at the top),
|
||||
@@ -21,7 +22,7 @@ const LINEAR_FLOW_PREFIXES = [
|
||||
|
||||
export default function BottomTabBar() {
|
||||
const pathname = usePathname() ?? '';
|
||||
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
|
||||
// const isAuthenticated = useAuthStore((s) => s.isAuthenticated); // TODO: re-enable auth
|
||||
|
||||
const isInLinearFlow = LINEAR_FLOW_PREFIXES.some((p) => pathname.startsWith(p));
|
||||
if (isInLinearFlow) return null;
|
||||
@@ -30,12 +31,13 @@ export default function BottomTabBar() {
|
||||
{ href: '/', label: 'Home', icon: Home, match: (p: string) => p === '/' },
|
||||
{ href: '/booking/lookup', label: 'Bookings', icon: Ticket, match: (p: string) => p.startsWith('/booking/lookup') || p.startsWith('/booking/detail') },
|
||||
{ href: '/contact', label: 'Contact', icon: Phone, match: (p: string) => p.startsWith('/contact') },
|
||||
{
|
||||
href: isAuthenticated ? '/profile' : '/login',
|
||||
label: isAuthenticated ? 'Account' : 'Sign in',
|
||||
icon: User,
|
||||
match: (p: string) => p.startsWith('/profile') || p.startsWith('/login') || p.startsWith('/register'),
|
||||
},
|
||||
// TODO: re-enable auth — auth login/register tab commented out until auth integration
|
||||
// {
|
||||
// href: isAuthenticated ? '/profile' : '/login',
|
||||
// label: isAuthenticated ? 'Account' : 'Sign in',
|
||||
// icon: User,
|
||||
// match: (p: string) => p.startsWith('/profile') || p.startsWith('/login') || p.startsWith('/register'),
|
||||
// },
|
||||
];
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user