Improve auction page loading and add a close button to guides
Optimizes auction data fetching with increased staleTime and implements a close button for the auction guide page by replacing the BookOpen icon with an X icon. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9a264234-c5d7-4dcc-adf3-a954b149b30d Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/9a264234-c5d7-4dcc-adf3-a954b149b30d/CMG42YQ
This commit is contained in:
@ -8,7 +8,8 @@ import {
|
|||||||
Target,
|
Target,
|
||||||
Gavel,
|
Gavel,
|
||||||
Home,
|
Home,
|
||||||
BookOpen
|
BookOpen,
|
||||||
|
X
|
||||||
} from "lucide-react";
|
} from "lucide-react";
|
||||||
|
|
||||||
export default function AuctionGuide() {
|
export default function AuctionGuide() {
|
||||||
@ -32,28 +33,14 @@ export default function AuctionGuide() {
|
|||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<div className="relative">
|
|
||||||
<Button
|
<Button
|
||||||
variant="ghost"
|
variant="ghost"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="relative"
|
|
||||||
onClick={handleGoBack}
|
onClick={handleGoBack}
|
||||||
data-testid="button-auction-guide"
|
data-testid="button-close-guide"
|
||||||
>
|
>
|
||||||
<BookOpen className="h-4 w-4" />
|
<X className="h-5 w-5" />
|
||||||
</Button>
|
</Button>
|
||||||
{/* Triangle indicator */}
|
|
||||||
<div className="absolute left-1/2 -translate-x-1/2 top-full z-10">
|
|
||||||
<div
|
|
||||||
className="w-0 h-0 border-l-[12px] border-l-transparent border-r-[12px] border-r-transparent border-b-[10px] border-b-gray-50"
|
|
||||||
style={{ filter: 'drop-shadow(0 -1px 0px rgba(229, 231, 235, 1))' }}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a href="/api/login">
|
|
||||||
<Button size="sm" data-testid="button-login">Login</Button>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -99,10 +99,12 @@ export default function Auctions() {
|
|||||||
|
|
||||||
const { data: auctions = [], isLoading: auctionsLoading } = useQuery<Auction[]>({
|
const { data: auctions = [], isLoading: auctionsLoading } = useQuery<Auction[]>({
|
||||||
queryKey: ["/api/auctions"],
|
queryKey: ["/api/auctions"],
|
||||||
|
staleTime: 30000, // 30초 동안 캐시 유지
|
||||||
});
|
});
|
||||||
|
|
||||||
const { data: mediaOutlets = [] } = useQuery<MediaOutlet[]>({
|
const { data: mediaOutlets = [] } = useQuery<MediaOutlet[]>({
|
||||||
queryKey: ["/api/media-outlets"],
|
queryKey: ["/api/media-outlets"],
|
||||||
|
staleTime: 60000, // 1분 동안 캐시 유지
|
||||||
});
|
});
|
||||||
|
|
||||||
const bidMutation = useMutation({
|
const bidMutation = useMutation({
|
||||||
|
|||||||
Reference in New Issue
Block a user