feat: back-to-home links on login and 404 pages
This commit is contained in:
@@ -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";
|
||||
@@ -95,7 +95,14 @@ export default function Login() {
|
||||
</Button>
|
||||
</form>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Card>
|
||||
|
||||
<div className="text-center">
|
||||
<Link href="/" className="text-sm text-muted-foreground hover:text-primary transition-colors">
|
||||
← Back to Home
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user