mirror of
https://github.com/christianvidalwolf-prog/Craze-Data-check.git
synced 2026-08-03 13:55:23 +02:00
Remove Upload/Reload tab from sidebar
This commit is contained in:
+2
-8
@@ -5,7 +5,6 @@ import { Sidebar } from './components/Sidebar';
|
|||||||
import { TopBar } from './components/TopBar';
|
import { TopBar } from './components/TopBar';
|
||||||
import { ProductDescriptions } from './components/ProductDescriptions';
|
import { ProductDescriptions } from './components/ProductDescriptions';
|
||||||
import { MatrixView } from './components/MatrixView';
|
import { MatrixView } from './components/MatrixView';
|
||||||
import { UploadReload } from './components/UploadReload';
|
|
||||||
import { EditPanel } from './components/EditPanel';
|
import { EditPanel } from './components/EditPanel';
|
||||||
import { getAllSyncedRows, saveRowToSupabase } from './lib/supabase';
|
import { getAllSyncedRows, saveRowToSupabase } from './lib/supabase';
|
||||||
import { getStoredSession, signOut, type AuthSession } from './lib/auth';
|
import { getStoredSession, signOut, type AuthSession } from './lib/auth';
|
||||||
@@ -30,7 +29,7 @@ export default function App() {
|
|||||||
fileDate: null,
|
fileDate: null,
|
||||||
hasUnsavedChanges: false
|
hasUnsavedChanges: false
|
||||||
});
|
});
|
||||||
const [activeModule, setActiveModule] = useState<'descriptions' | 'matrix' | 'upload'>('descriptions');
|
const [activeModule, setActiveModule] = useState<'descriptions' | 'matrix'>('descriptions');
|
||||||
const [editingRowIndex, setEditingRowIndex] = useState<number | null>(null);
|
const [editingRowIndex, setEditingRowIndex] = useState<number | null>(null);
|
||||||
const [isLoadingDefault, setIsLoadingDefault] = useState(true);
|
const [isLoadingDefault, setIsLoadingDefault] = useState(true);
|
||||||
const [defaultLoadError, setDefaultLoadError] = useState<string | null>(null);
|
const [defaultLoadError, setDefaultLoadError] = useState<string | null>(null);
|
||||||
@@ -312,12 +311,7 @@ export default function App() {
|
|||||||
{activeModule === 'matrix' && (
|
{activeModule === 'matrix' && (
|
||||||
<MatrixView data={appState.data} headers={appState.headers} />
|
<MatrixView data={appState.data} headers={appState.headers} />
|
||||||
)}
|
)}
|
||||||
{activeModule === 'upload' && (
|
|
||||||
<UploadReload
|
|
||||||
appState={appState}
|
|
||||||
onUpload={handleFileUpload}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -1,17 +1,16 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Upload, FileSpreadsheet, FileText, CheckSquare, Table } from 'lucide-react';
|
import { FileSpreadsheet, FileText, CheckSquare, Table } from 'lucide-react';
|
||||||
import { cn } from '../lib/utils';
|
import { cn } from '../lib/utils';
|
||||||
|
|
||||||
interface SidebarProps {
|
interface SidebarProps {
|
||||||
activeModule: string;
|
activeModule: string;
|
||||||
setActiveModule: (m: 'descriptions' | 'completeness' | 'matrix' | 'upload') => void;
|
setActiveModule: (m: 'descriptions' | 'completeness' | 'matrix') => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Sidebar({ activeModule, setActiveModule }: SidebarProps) {
|
export function Sidebar({ activeModule, setActiveModule }: SidebarProps) {
|
||||||
const navItems = [
|
const navItems = [
|
||||||
{ id: 'descriptions', label: 'Product Descriptions', icon: FileText },
|
{ id: 'descriptions', label: 'Product Descriptions', icon: FileText },
|
||||||
{ id: 'matrix', label: 'Matrix', icon: Table },
|
{ id: 'matrix', label: 'Matrix', icon: Table },
|
||||||
{ id: 'upload', label: 'Upload / Reload', icon: Upload },
|
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user