Update "Add Manufacturer" button

This commit is contained in:
gpt-engineer-app[bot]
2025-09-30 13:04:14 +00:00
parent 03edb264c1
commit 888b7e3acb

View File

@@ -130,12 +130,19 @@ export default function Manufacturers() {
<Factory className="w-10 h-10 text-primary" /> <Factory className="w-10 h-10 text-primary" />
<h1 className="text-4xl font-bold">Manufacturers</h1> <h1 className="text-4xl font-bold">Manufacturers</h1>
</div> </div>
{(user && isModerator()) && ( <Button
<Button onClick={() => setIsCreateModalOpen(true)}> onClick={() => {
<Plus className="w-4 h-4 mr-2" /> if (!user) {
Create Manufacturer navigate('/auth');
} else {
setIsCreateModalOpen(true);
}
}}
className="gap-2"
>
<Plus className="w-4 h-4" />
Add Manufacturer
</Button> </Button>
)}
</div> </div>
<p className="text-lg text-muted-foreground"> <p className="text-lg text-muted-foreground">
Explore the manufacturers behind your favorite rides and attractions Explore the manufacturers behind your favorite rides and attractions