refactor: remove unused files and fix naming convention
This commit is contained in:
@@ -28,7 +28,7 @@ import {
|
||||
} from "@/lib/api"
|
||||
import { toast } from "sonner"
|
||||
|
||||
export default function CreateLocationPage() {
|
||||
export default function LocationPage() {
|
||||
const [locations, setLocations] = useState<Location[]>([])
|
||||
const [projects, setProjects] = useState<Project[]>([])
|
||||
const [packages, setPackages] = useState<PackageType[]>([])
|
||||
@@ -1,49 +0,0 @@
|
||||
"use client"
|
||||
|
||||
import { NavigationMenu } from "@/components/navigation-menu"
|
||||
import { DashboardMap } from "@/components/dashboard/dashboard-map"
|
||||
import { PoweredBy } from "@/components/powered-by"
|
||||
|
||||
export default function MapPage() {
|
||||
return (
|
||||
<div className="min-h-screen relative overflow-hidden ml-20">
|
||||
{/* Navigation Menu */}
|
||||
<NavigationMenu />
|
||||
|
||||
<div className="container mx-auto px-4 py-8 max-w-340 relative z-10">
|
||||
{/* Header */}
|
||||
<div className="mb-8">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<h1 className="text-3xl md:text-4xl font-bold heading-blue-gradient leading-tight">
|
||||
Detection Map
|
||||
</h1>
|
||||
<p className="text-muted-foreground mt-1">
|
||||
View all detected potholes and signboards on the map
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Map */}
|
||||
<div className="">
|
||||
<DashboardMap className="h-[calc(100vh-200px)] min-h-[500px]" />
|
||||
</div>
|
||||
|
||||
{/* Legend */}
|
||||
<div className="mt-6 flex flex-wrap gap-6">
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-4 rounded-full bg-red-500 border-2 border-red-600" />
|
||||
<span className="text-sm text-muted-foreground">Pothole</span>
|
||||
</div>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="w-4 h-4 rounded-full bg-blue-500 border-2 border-blue-600" />
|
||||
<span className="text-sm text-muted-foreground">Signboard</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<PoweredBy />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
import { toast } from "sonner"
|
||||
import { PoweredBy } from "@/components/powered-by"
|
||||
|
||||
export default function CreatePackagePage() {
|
||||
export default function PackagePage() {
|
||||
const [packages, setPackages] = useState<PackageType[]>([])
|
||||
const [projects, setProjects] = useState<Project[]>([])
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
@@ -216,7 +216,7 @@ export default function CreatePackagePage() {
|
||||
{/* Error Message */}
|
||||
{error && !isModalOpen && (
|
||||
<div className="mb-6 flex items-center gap-3 p-4 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800">
|
||||
<div className="w-5 h-5 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center flex-shrink-0">
|
||||
<div className="w-5 h-5 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center shrink-0">
|
||||
<span className="text-xs font-bold text-red-500">!</span>
|
||||
</div>
|
||||
<p className="text-sm text-red-600 dark:text-red-400 break-all">{error}</p>
|
||||
@@ -270,7 +270,7 @@ export default function CreatePackagePage() {
|
||||
{/* Error Message in Modal */}
|
||||
{error && (
|
||||
<div className="flex items-center gap-3 p-4 rounded-xl bg-red-50 dark:bg-red-950/30 border border-red-200 dark:border-red-800">
|
||||
<div className="w-5 h-5 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center flex-shrink-0">
|
||||
<div className="w-5 h-5 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center shrink-0">
|
||||
<span className="text-xs font-bold text-red-500">!</span>
|
||||
</div>
|
||||
<p className="text-sm text-red-600 dark:text-red-400 break-all">{error}</p>
|
||||
@@ -14,7 +14,7 @@ import { createProject, fetchProjects, updateProject, deleteProject, type Projec
|
||||
import { toast } from "sonner"
|
||||
import { PoweredBy } from "@/components/powered-by"
|
||||
|
||||
export default function CreateProjectPage() {
|
||||
export default function ProjectPage() {
|
||||
const [projects, setProjects] = useState<Project[]>([])
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
const [isModalOpen, setIsModalOpen] = useState(false)
|
||||
Reference in New Issue
Block a user