Improve user authentication and navigation flow

Introduce a loading state for authentication, refactor route handling to conditionally render authenticated vs. unauthenticated views, add an Auction Guide page, and update navigation links to use the Link component for client-side routing.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 069d4324-6c40-4355-955e-c714a50de1ea
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/069d4324-6c40-4355-955e-c714a50de1ea/u6Yn0uG
This commit is contained in:
kimjaehyeon0101
2025-09-29 15:55:11 +00:00
parent b332e8bc6f
commit 6de5cfd9e7
4 changed files with 537 additions and 20 deletions

View File

@ -0,0 +1,467 @@
import { Button } from "@/components/ui/button";
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { Link } from "wouter";
import {
Lightbulb,
Settings,
TrendingUp,
Award,
List,
Brain,
Gavel,
Home,
Calculator,
Users,
Hash,
Building,
DollarSign,
Star,
Target,
BookOpen
} from "lucide-react";
export default function AuctionGuide() {
return (
<div className="min-h-screen bg-background">
{/* Header */}
<header className="bg-card border-b border-border sticky top-0 z-50">
<div className="max-w-7xl mx-auto px-6 py-4">
<div className="flex items-center justify-between">
<div className="flex items-center space-x-3">
<div className="w-10 h-10 bg-primary rounded-lg flex items-center justify-center text-primary-foreground font-bold text-lg">
S
</div>
<span className="text-2xl font-bold tracking-tight">SAPIENS</span>
</div>
<div className="flex items-center space-x-4">
<nav className="hidden md:flex space-x-6">
<Link href="/" className="text-muted-foreground hover:text-foreground transition-colors" data-testid="link-home">Home</Link>
<Link href="/auctions" className="text-muted-foreground hover:text-foreground transition-colors" data-testid="link-auctions">Auctions</Link>
<Link href="/auction-guide" className="text-foreground font-medium" data-testid="link-auction-guide">Auction Guide</Link>
</nav>
<a href="/api/login">
<Button data-testid="button-login">Login</Button>
</a>
</div>
</div>
</div>
</header>
<main className="max-w-6xl mx-auto px-6 py-8">
{/* Header Section */}
<div className="mb-8">
<h1 className="text-4xl font-bold mb-4" data-testid="text-guide-title">SAPIENS </h1>
<p className="text-xl text-muted-foreground">
</p>
</div>
{/* Overview Card */}
<Card className="mb-8" data-testid="section-overview">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<Lightbulb className="h-5 w-5 text-primary" />
<span> </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h3 className="font-semibold text-lg mb-3">🎯 </h3>
<ul className="space-y-2 text-sm">
<li> <strong> </strong>: </li>
<li> <strong> </strong>: × </li>
<li> <strong> </strong>: 2 </li>
<li> <strong> </strong>: </li>
</ul>
</div>
<div>
<h3 className="font-semibold text-lg mb-3">📊 </h3>
<ul className="space-y-2 text-sm">
<li> <strong>People (24)</strong>: </li>
<li> <strong>Topics (20)</strong>: </li>
<li> <strong>Companies (27)</strong>: </li>
<li> <strong> </strong>: </li>
</ul>
</div>
</div>
</CardContent>
</Card>
{/* Core Mechanism */}
<Card className="mb-8" data-testid="section-mechanism">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<Settings className="h-5 w-5 text-chart-1" />
<span>1. </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-6">
<div className="bg-primary/5 rounded-lg p-6">
<h3 className="font-semibold text-lg mb-4 flex items-center">
<Award className="h-5 w-5 text-primary mr-2" />
(Vickrey Auction)
</h3>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<div className="text-center">
<div className="w-12 h-12 bg-primary rounded-full flex items-center justify-center text-primary-foreground font-bold text-lg mx-auto mb-2">1</div>
<h4 className="font-medium mb-2"> </h4>
<p className="text-sm text-muted-foreground"> </p>
</div>
<div className="text-center">
<div className="w-12 h-12 bg-chart-2 rounded-full flex items-center justify-center text-white font-bold text-lg mx-auto mb-2">2</div>
<h4 className="font-medium mb-2">2 </h4>
<p className="text-sm text-muted-foreground"> 2 </p>
</div>
<div className="text-center">
<div className="w-12 h-12 bg-chart-3 rounded-full flex items-center justify-center text-white font-bold text-lg mx-auto mb-2">3</div>
<h4 className="font-medium mb-2"> </h4>
<p className="text-sm text-muted-foreground"> </p>
</div>
</div>
</div>
<div className="bg-chart-1/5 rounded-lg p-6">
<h4 className="font-semibold mb-3">📝 </h4>
<div className="space-y-2 text-sm">
<p><strong>A :</strong> $1,000 × 85 = 85,000 (1 )</p>
<p><strong>B :</strong> $800 × 90 = 72,000 (2)</p>
<p><strong>C :</strong> $1,200 × 60 = 72,000 (3)</p>
<p className="pt-2 font-medium text-primary">
A가 B의 $800
</p>
</div>
</div>
</div>
</CardContent>
</Card>
{/* Ranking System */}
<Card className="mb-8" data-testid="section-ranking">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<TrendingUp className="h-5 w-5 text-chart-2" />
<span>2. </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-6">
<div className="text-center bg-gradient-to-r from-primary/10 to-chart-2/10 rounded-lg p-6">
<h3 className="text-2xl font-bold mb-4"> </h3>
<div className="text-3xl font-bold text-primary mb-2">
= × ( ÷ 100)
</div>
<p className="text-muted-foreground"> </p>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h4 className="font-semibold text-lg mb-3 flex items-center">
<DollarSign className="h-5 w-5 text-primary mr-2" />
(Bid Amount)
</h4>
<ul className="space-y-2 text-sm">
<li> 입찰가: $100</li>
<li> 입찰가: $100,000</li>
<li> </li>
<li> 기간: 기본 30</li>
</ul>
</div>
<div>
<h4 className="font-semibold text-lg mb-3 flex items-center">
<Star className="h-5 w-5 text-chart-2 mr-2" />
(Quality Score)
</h4>
<ul className="space-y-2 text-sm">
<li> 범위: 1-100</li>
<li> </li>
<li> </li>
<li> </li>
</ul>
</div>
</div>
</div>
</CardContent>
</Card>
{/* Quality Score System */}
<Card className="mb-8" data-testid="section-quality">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<Award className="h-5 w-5 text-chart-3" />
<span>3. </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-6">
<div className="grid grid-cols-1 md:grid-cols-3 gap-4">
<Card className="border-destructive/20">
<CardContent className="p-4 text-center">
<Badge variant="destructive" className="mb-2">1-40</Badge>
<h4 className="font-semibold mb-2"> </h4>
<ul className="text-xs space-y-1">
<li> </li>
<li> </li>
<li> </li>
</ul>
</CardContent>
</Card>
<Card className="border-chart-4/20">
<CardContent className="p-4 text-center">
<Badge variant="secondary" className="mb-2">41-70</Badge>
<h4 className="font-semibold mb-2"> </h4>
<ul className="text-xs space-y-1">
<li> </li>
<li> </li>
<li> </li>
</ul>
</CardContent>
</Card>
<Card className="border-chart-2/20">
<CardContent className="p-4 text-center">
<Badge variant="default" className="mb-2">71-100</Badge>
<h4 className="font-semibold mb-2"> </h4>
<ul className="text-xs space-y-1">
<li> </li>
<li> </li>
<li> </li>
</ul>
</CardContent>
</Card>
</div>
<div className="bg-chart-2/5 rounded-lg p-6">
<h4 className="font-semibold mb-3 flex items-center">
<Calculator className="h-5 w-5 text-chart-2 mr-2" />
</h4>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
<div>
<h5 className="font-medium mb-2">📈 </h5>
<p className="text-muted-foreground"> </p>
</div>
<div>
<h5 className="font-medium mb-2">💰 </h5>
<p className="text-muted-foreground"> </p>
</div>
<div>
<h5 className="font-medium mb-2">🎯 </h5>
<p className="text-muted-foreground"> </p>
</div>
</div>
</div>
</div>
</CardContent>
</Card>
{/* Auction Types */}
<Card className="mb-8" data-testid="section-types">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<List className="h-5 w-5 text-chart-4" />
<span>4. </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
<Card className="border-primary/20">
<CardContent className="p-4">
<h4 className="font-semibold text-lg mb-3 flex items-center">
<Users className="h-5 w-5 text-primary mr-2" />
People ()
</h4>
<ul className="space-y-2 text-sm">
<li> <strong>24 </strong></li>
<li> </li>
<li> </li>
<li> </li>
<li> 입찰: $500</li>
</ul>
</CardContent>
</Card>
<Card className="border-chart-1/20">
<CardContent className="p-4">
<h4 className="font-semibold text-lg mb-3 flex items-center">
<Hash className="h-5 w-5 text-chart-1 mr-2" />
Topics ()
</h4>
<ul className="space-y-2 text-sm">
<li> <strong>20 </strong></li>
<li> </li>
<li> </li>
<li> </li>
<li> 입찰: $300</li>
</ul>
</CardContent>
</Card>
<Card className="border-chart-2/20">
<CardContent className="p-4">
<h4 className="font-semibold text-lg mb-3 flex items-center">
<Building className="h-5 w-5 text-chart-2 mr-2" />
Companies ()
</h4>
<ul className="space-y-2 text-sm">
<li> <strong>27 </strong></li>
<li> </li>
<li> </li>
<li> </li>
<li> 입찰: $1,000</li>
</ul>
</CardContent>
</Card>
</div>
</CardContent>
</Card>
{/* Strategic Bidding */}
<Card className="mb-8" data-testid="section-strategy">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<Target className="h-5 w-5 text-chart-5" />
<span>5. </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-6">
<div className="grid grid-cols-1 md:grid-cols-2 gap-6">
<div>
<h4 className="font-semibold text-lg mb-3 text-primary">💡 </h4>
<ul className="space-y-2 text-sm">
<li> <strong> </strong>: ROI가 </li>
<li> <strong> </strong>: </li>
<li> <strong> </strong>: </li>
<li> <strong> </strong>: </li>
</ul>
</div>
<div>
<h4 className="font-semibold text-lg mb-3 text-destructive"> </h4>
<ul className="space-y-2 text-sm">
<li> <strong> </strong>: </li>
<li> <strong> </strong>: </li>
<li> <strong> </strong>: </li>
<li> <strong> </strong>: </li>
</ul>
</div>
</div>
<div className="bg-accent/10 rounded-lg p-6">
<h4 className="font-semibold mb-3 flex items-center">
<Lightbulb className="h-5 w-5 text-accent mr-2" />
</h4>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
<div>
<h5 className="font-medium mb-2">1단계: 준비</h5>
<ul className="space-y-1 text-muted-foreground">
<li> </li>
<li> </li>
<li> </li>
</ul>
</div>
<div>
<h5 className="font-medium mb-2">2단계: 분석</h5>
<ul className="space-y-1 text-muted-foreground">
<li> </li>
<li> </li>
<li> </li>
</ul>
</div>
<div>
<h5 className="font-medium mb-2">3단계: 실행</h5>
<ul className="space-y-1 text-muted-foreground">
<li> </li>
<li> </li>
<li> </li>
</ul>
</div>
</div>
</div>
</div>
</CardContent>
</Card>
{/* Technical Implementation */}
<Card className="mb-8" data-testid="section-technical">
<CardHeader>
<CardTitle className="flex items-center space-x-2">
<Brain className="h-5 w-5 text-primary" />
<span>6. </span>
</CardTitle>
</CardHeader>
<CardContent>
<div className="space-y-6">
<div className="bg-primary/5 rounded-lg p-6">
<h4 className="font-semibold mb-3">🔧 </h4>
<div className="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm">
<div>
<h5 className="font-medium mb-2"> </h5>
<ul className="space-y-1 text-muted-foreground">
<li> PostgreSQL </li>
<li> </li>
<li> </li>
</ul>
</div>
<div>
<h5 className="font-medium mb-2"> </h5>
<ul className="space-y-1 text-muted-foreground">
<li> </li>
<li> </li>
<li> </li>
</ul>
</div>
</div>
</div>
<div className="bg-chart-2/5 rounded-lg p-6">
<h4 className="font-semibold mb-3">📊 </h4>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 text-sm">
<div>
<h5 className="font-medium mb-2"> </h5>
<p className="text-muted-foreground"> </p>
</div>
<div>
<h5 className="font-medium mb-2"> </h5>
<p className="text-muted-foreground"> </p>
</div>
<div>
<h5 className="font-medium mb-2"> </h5>
<p className="text-muted-foreground"> ROI </p>
</div>
</div>
</div>
</div>
</CardContent>
</Card>
{/* Call to Action */}
<Card className="bg-gradient-to-r from-primary/10 to-chart-2/10">
<CardContent className="p-8 text-center">
<h3 className="text-2xl font-bold mb-4"> !</h3>
<p className="text-lg text-muted-foreground mb-6">
</p>
<div className="flex justify-center space-x-4">
<Link href="/auctions">
<Button size="lg" data-testid="button-view-auctions">
<Gavel className="mr-2 h-4 w-4" />
</Button>
</Link>
<Link href="/">
<Button variant="outline" size="lg" data-testid="button-back-home">
<Home className="mr-2 h-4 w-4" />
</Button>
</Link>
</div>
</CardContent>
</Card>
</main>
</div>
);
}