Update site navigation and logout functionality
Refactors client-side navigation to use `wouter`'s `setLocation` instead of `window.location.href` for smoother transitions and improves the logout process by making it an asynchronous POST request with proper error handling and state invalidation. Also adds an "Auctions" button to the main navigation bar on multiple pages. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 069d4324-6c40-4355-955e-c714a50de1ea Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/3df548ff-50ae-432f-9be4-25d34eccc983/069d4324-6c40-4355-955e-c714a50de1ea/bLfICpO
This commit is contained in:
@ -158,10 +158,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
||||
return res.status(404).json({ message: "Media outlet not found" });
|
||||
}
|
||||
const auction = await storage.getAuctionByMediaOutlet(outlet.id);
|
||||
if (!auction) {
|
||||
return res.status(404).json({ message: "No active auction found for this media outlet" });
|
||||
}
|
||||
res.json(auction);
|
||||
res.json(auction || null);
|
||||
} catch (error) {
|
||||
console.error("Error fetching auction:", error);
|
||||
res.status(500).json({ message: "Failed to fetch auction" });
|
||||
|
||||
Reference in New Issue
Block a user