feat: back-to-home links on login and 404 pages

This commit is contained in:
root
2026-07-29 23:19:27 +02:00
parent 45f0b80055
commit 7bda8f95f3
2 changed files with 24 additions and 12 deletions
+8 -1
View File
@@ -1,5 +1,5 @@
import { useState } from "react";
import { useLocation, useSearch } from "wouter";
import { useLocation, useSearch, Link } from "wouter";
import { useLocalLogin } from "@workspace/api-client-react";
import { useQueryClient } from "@tanstack/react-query";
import { Button } from "@/components/ui/button";
@@ -96,6 +96,13 @@ export default function Login() {
</form>
</CardContent>
</Card>
<div className="text-center">
<Link href="/" className="text-sm text-muted-foreground hover:text-primary transition-colors">
&larr; Back to Home
</Link>
</div>
</div>
</div>
</div>
);
+15 -10
View File
@@ -1,19 +1,24 @@
import { Card, CardContent } from "@/components/ui/card";
import { AlertCircle } from "lucide-react";
import { Button } from "@/components/ui/button";
import { Wrench, ArrowLeft } from "lucide-react";
import { Link } from "wouter";
export default function NotFound() {
return (
<div className="min-h-screen w-full flex items-center justify-center bg-gray-50">
<div className="min-h-screen w-full flex items-center justify-center bg-background">
<Card className="w-full max-w-md mx-4">
<CardContent className="pt-6">
<div className="flex mb-4 gap-2">
<AlertCircle className="h-8 w-8 text-red-500" />
<h1 className="text-2xl font-bold text-gray-900">404 Page Not Found</h1>
<CardContent className="pt-6 pb-6 text-center">
<div className="flex items-center justify-center gap-2 text-primary font-bold text-xl mb-6">
<Wrench className="w-6 h-6" />
<span>ToolRate</span>
</div>
<p className="mt-4 text-sm text-gray-600">
Did you forget to add the page to the router?
</p>
<h1 className="text-6xl font-bold text-muted-foreground/30 mb-2">404</h1>
<p className="text-muted-foreground mb-6">This page doesn't exist.</p>
<Link href="/">
<Button variant="outline" className="gap-2">
<ArrowLeft className="w-4 h-4" /> Back to Home
</Button>
</Link>
</CardContent>
</Card>
</div>