Spaces:
Runtime error
Runtime error
Download frontend/src/App.tsx from adwhytahumans/CRM_FastAPI_React: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/spaces/adwhytahumans/CRM_FastAPI_React/resolve/main/frontend/src/App.tsx
- Command line
-
hf download hf://spaces/adwhytahumans/CRM_FastAPI_React/frontend/src/App.tsx
-
curl -L -o App.tsx https://huggingface.co/spaces/adwhytahumans/CRM_FastAPI_React/resolve/main/frontend/src/App.tsx
1.31 kB
| import React, { useCallback } from 'react'; | |
| import { Toaster } from "@/components/ui/toaster"; | |
| import { LearnersTable } from "@/components/learners-table" | |
| import { Button } from "@/components/ui/button" | |
| import { Plus } from "lucide-react" | |
| import { useState } from "react" | |
| import { AddLearnerDialog } from "@/components/add-learner-dialog" | |
| function App() { | |
| const [isAddDialogOpen, setIsAddDialogOpen] = useState(false) | |
| const [refreshTrigger, setRefreshTrigger] = useState(0) | |
| const handleSuccess = useCallback(() => { | |
| setRefreshTrigger(prev => prev + 1) | |
| }, []) | |
| return ( | |
| <div className="min-h-screen bg-background"> | |
| <div className="container mx-auto py-10"> | |
| <div className="flex justify-between items-center mb-8"> | |
| <h1 className="text-3xl font-bold">100x Elite CRM</h1> | |
| <Button onClick={() => setIsAddDialogOpen(true)}> | |
| <Plus className="mr-2 h-4 w-4" /> | |
| Add Learner | |
| </Button> | |
| </div> | |
| <div className="rounded-md border"> | |
| <LearnersTable key={refreshTrigger} /> | |
| </div> | |
| </div> | |
| <AddLearnerDialog | |
| open={isAddDialogOpen} | |
| onOpenChange={setIsAddDialogOpen} | |
| onSuccess={handleSuccess} | |
| /> | |
| <Toaster /> | |
| </div> | |
| ); | |
| } | |
| export default App; |