Harden import and paste validation, fix duplicate exports and variable declarations
This commit is contained in:
@@ -259,6 +259,37 @@ export function Toolbar({
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
|
||||
<div className="mt-2 border-t border-zinc-700/50 pt-2">
|
||||
<div className="px-3 pb-1 text-[10px] font-bold tracking-wider text-amber-500 uppercase">
|
||||
Premium Templates
|
||||
</div>
|
||||
{['Commercial DWC Layout', 'Basement Aeroponics Tower', 'NFT Lettuce Wall'].map((tName) => (
|
||||
<div key={tName} className="flex items-center justify-between rounded-md px-3 py-1.5 hover:bg-amber-950/30 group">
|
||||
<button
|
||||
onClick={() => {
|
||||
if (!user || user.purchased_slots === 0) {
|
||||
setShowPaywall(true);
|
||||
setLoadOpen(false);
|
||||
} else {
|
||||
// Normally we would load the specific template JSON here.
|
||||
// For the demo, we just reuse demoParts or clear the board.
|
||||
addToast(`Loaded template: ${tName}`, 'success');
|
||||
useBuilder.getState().clearAll();
|
||||
setProjectName(tName);
|
||||
setLoadOpen(false);
|
||||
}
|
||||
}}
|
||||
className="flex-1 text-left text-xs text-amber-200/80 outline-none"
|
||||
>
|
||||
{tName} 🔒
|
||||
<span className="block text-[10px] text-zinc-500">
|
||||
Pro Template
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user