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
+9 -2
View File
@@ -1,5 +1,5 @@
import { useState } from "react"; import { useState } from "react";
import { useLocation, useSearch } from "wouter"; import { useLocation, useSearch, Link } from "wouter";
import { useLocalLogin } from "@workspace/api-client-react"; import { useLocalLogin } from "@workspace/api-client-react";
import { useQueryClient } from "@tanstack/react-query"; import { useQueryClient } from "@tanstack/react-query";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
@@ -95,7 +95,14 @@ export default function Login() {
</Button> </Button>
</form> </form>
</CardContent> </CardContent>
</Card> </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>
</div> </div>
); );
+15 -10
View File
@@ -1,19 +1,24 @@
import { Card, CardContent } from "@/components/ui/card"; 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() { export default function NotFound() {
return ( 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"> <Card className="w-full max-w-md mx-4">
<CardContent className="pt-6"> <CardContent className="pt-6 pb-6 text-center">
<div className="flex mb-4 gap-2"> <div className="flex items-center justify-center gap-2 text-primary font-bold text-xl mb-6">
<AlertCircle className="h-8 w-8 text-red-500" /> <Wrench className="w-6 h-6" />
<h1 className="text-2xl font-bold text-gray-900">404 Page Not Found</h1> <span>ToolRate</span>
</div> </div>
<h1 className="text-6xl font-bold text-muted-foreground/30 mb-2">404</h1>
<p className="mt-4 text-sm text-gray-600"> <p className="text-muted-foreground mb-6">This page doesn't exist.</p>
Did you forget to add the page to the router? <Link href="/">
</p> <Button variant="outline" className="gap-2">
<ArrowLeft className="w-4 h-4" /> Back to Home
</Button>
</Link>
</CardContent> </CardContent>
</Card> </Card>
</div> </div>