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" />
<h1 className="text-4xl font-bold">Manufacturers</h1>
</div>
{(user && isModerator()) && (
<Button onClick={() => setIsCreateModalOpen(true)}>
<Plus className="w-4 h-4 mr-2" />
Create Manufacturer
<Button
onClick={() => {
if (!user) {
navigate('/auth');
} else {
setIsCreateModalOpen(true);
}
}}
className="gap-2"
>
<Plus className="w-4 h-4" />
Add Manufacturer
</Button>
)}
</div>
<p className="text-lg text-muted-foreground">
Explore the manufacturers behind your favorite rides and attractions