refactor: add inventory dashboard link with appropriate attributes in the panel

This commit is contained in:
MayaTheShy
2026-03-22 04:10:28 -04:00
parent 9b09a59eba
commit 79b50071ee

View File

@@ -16,6 +16,8 @@ function App() {
const turtles = useTurtleStore((state) => state.getTurtleArray());
const selectedTurtle = useTurtleStore((state) => state.getSelectedTurtle());
const inventoryDashboardUrl = import.meta.env.VITE_INVENTORY_DASHBOARD_URL || `${window.location.protocol}//${window.location.hostname}`;
useEffect(() => {
connect();
}, [connect]);
@@ -52,6 +54,15 @@ function App() {
</div>
<div className="panel-container">
<div className="panel-tabs">
<a
href={inventoryDashboardUrl}
className="cross-link-btn"
title="Open Inventory Manager Dashboard"
target="_blank"
rel="noopener noreferrer"
>
📦 Inventory
</a>
<button
className={panelTab === 'control' ? 'active' : ''}
onClick={() => setPanelTab('control')}