refactor: add inventory dashboard link with appropriate attributes in the panel
This commit is contained in:
@@ -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')}
|
||||
|
||||
Reference in New Issue
Block a user