fix(dashboard): Remove refresh button and HealthPanel
- Removed refresh button and refreshing state from Dashboard - Removed HealthPanel component (deploy status auto-refresh) - Simplified header layout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
4
cannaiq/dist/index.html
vendored
4
cannaiq/dist/index.html
vendored
@@ -7,8 +7,8 @@
|
|||||||
<title>CannaIQ - Cannabis Menu Intelligence Platform</title>
|
<title>CannaIQ - Cannabis Menu Intelligence Platform</title>
|
||||||
<meta name="description" content="CannaIQ provides real-time cannabis dispensary menu data, product tracking, and analytics for dispensaries across Arizona." />
|
<meta name="description" content="CannaIQ provides real-time cannabis dispensary menu data, product tracking, and analytics for dispensaries across Arizona." />
|
||||||
<meta name="keywords" content="cannabis, dispensary, menu, products, analytics, Arizona" />
|
<meta name="keywords" content="cannabis, dispensary, menu, products, analytics, Arizona" />
|
||||||
<script type="module" crossorigin src="/assets/index-CS5yp19A.js"></script>
|
<script type="module" crossorigin src="/assets/index-Dq9S0rVi.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-4959QN4j.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DhM09B-d.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
import { Layout } from '../components/Layout';
|
import { Layout } from '../components/Layout';
|
||||||
import { HealthPanel } from '../components/HealthPanel';
|
|
||||||
import { api } from '../lib/api';
|
import { api } from '../lib/api';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
import {
|
import {
|
||||||
@@ -42,7 +41,6 @@ export function Dashboard() {
|
|||||||
const [activity, setActivity] = useState<any>(null);
|
const [activity, setActivity] = useState<any>(null);
|
||||||
const [nationalStats, setNationalStats] = useState<any>(null);
|
const [nationalStats, setNationalStats] = useState<any>(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
|
||||||
const [pendingChangesCount, setPendingChangesCount] = useState(0);
|
const [pendingChangesCount, setPendingChangesCount] = useState(0);
|
||||||
const [showNotification, setShowNotification] = useState(false);
|
const [showNotification, setShowNotification] = useState(false);
|
||||||
const [taskCounts, setTaskCounts] = useState<Record<string, number> | null>(null);
|
const [taskCounts, setTaskCounts] = useState<Record<string, number> | null>(null);
|
||||||
@@ -93,10 +91,7 @@ export function Dashboard() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadData = async (isRefresh = false) => {
|
const loadData = async () => {
|
||||||
if (isRefresh) {
|
|
||||||
setRefreshing(true);
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
// Fetch dashboard data (primary data source)
|
// Fetch dashboard data (primary data source)
|
||||||
const dashboard = await api.getMarketDashboard();
|
const dashboard = await api.getMarketDashboard();
|
||||||
@@ -158,7 +153,6 @@ export function Dashboard() {
|
|||||||
console.error('Failed to load dashboard:', error);
|
console.error('Failed to load dashboard:', error);
|
||||||
} finally {
|
} finally {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
setRefreshing(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -271,24 +265,11 @@ export function Dashboard() {
|
|||||||
|
|
||||||
<div className="space-y-8">
|
<div className="space-y-8">
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex flex-col sm:flex-row sm:justify-between sm:items-center gap-4">
|
<div>
|
||||||
<div>
|
<h1 className="text-xl sm:text-2xl font-semibold text-gray-900">Dashboard</h1>
|
||||||
<h1 className="text-xl sm:text-2xl font-semibold text-gray-900">Dashboard</h1>
|
<p className="text-sm text-gray-500 mt-1">Monitor your dispensary data aggregation</p>
|
||||||
<p className="text-sm text-gray-500 mt-1">Monitor your dispensary data aggregation</p>
|
|
||||||
</div>
|
|
||||||
<button
|
|
||||||
onClick={() => loadData(true)}
|
|
||||||
disabled={refreshing}
|
|
||||||
className="inline-flex items-center justify-center gap-2 px-4 py-2 bg-white border border-gray-200 rounded-lg hover:bg-gray-50 transition-colors text-sm font-medium text-gray-700 self-start sm:self-auto disabled:opacity-50 disabled:cursor-not-allowed"
|
|
||||||
>
|
|
||||||
<RefreshCw className={`w-4 h-4 ${refreshing ? 'animate-spin' : ''}`} />
|
|
||||||
{refreshing ? 'Refreshing...' : 'Refresh'}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* System Health */}
|
|
||||||
<HealthPanel showQueues={false} refreshInterval={60000} />
|
|
||||||
|
|
||||||
{/* Stats Grid */}
|
{/* Stats Grid */}
|
||||||
<div className="grid grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-6">
|
<div className="grid grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-6">
|
||||||
{/* Products */}
|
{/* Products */}
|
||||||
|
|||||||
Reference in New Issue
Block a user