feat(auth): Implemented Session Persistence

This commit is contained in:
dhinesh-m24
2026-01-29 12:39:45 +05:30
parent e214e32c17
commit 7133e59e57
10 changed files with 417 additions and 32 deletions

View File

@@ -0,0 +1,53 @@
import React from "react";
import { Link } from "react-router-dom";
import { ArrowLeft } from "lucide-react";
import { Button } from "./ui/button";
interface PageHeaderProps {
title: string;
subtitle?: string;
actions?: React.ReactNode;
backTo?: string | null;
backButtonLabel?: string;
}
export default function PageHeader({
title,
subtitle,
actions = null,
backTo = null,
backButtonLabel = "Back"
}: PageHeaderProps) {
return (
<div className="mb-8">
{/* Back Button */}
{backTo && (
<Link to={backTo} className="inline-block mb-4">
<Button variant="ghost" className="hover:bg-muted">
<ArrowLeft className="w-4 h-4 mr-2" />
{backButtonLabel}
</Button>
</Link>
)}
{/* Main Header */}
<div className="flex items-center justify-between">
<div>
<h1 className="text-3xl md:text-4xl font-bold text-foreground mb-2">
{title}
</h1>
{subtitle && (
<p className="text-lg text-muted-foreground">{subtitle}</p>
)}
</div>
{/* Custom Actions (if provided) */}
{actions && (
<div className="flex items-center gap-2">
{actions}
</div>
)}
</div>
</div>
);
}