refactor : restructure types
This commit is contained in:
@@ -7,7 +7,7 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select"
|
||||
import { type Project } from "@/lib/api"
|
||||
import { Project } from "@/types"
|
||||
|
||||
interface CompactProjectSelectorProps {
|
||||
projects: Project[]
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useEffect } from "react"
|
||||
import { MapContainer, TileLayer, CircleMarker, Popup, useMap } from "react-leaflet"
|
||||
import { LatLngBounds, LatLng } from "leaflet"
|
||||
import "leaflet/dist/leaflet.css"
|
||||
import { type Detection } from "@/lib/api"
|
||||
import { Detection } from "@/types"
|
||||
|
||||
interface DashboardMapContentProps {
|
||||
detections: Detection[]
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useEffect, useState } from "react"
|
||||
import dynamic from "next/dynamic"
|
||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"
|
||||
import { Loader2, MapPin } from "lucide-react"
|
||||
import { type Detection } from "@/lib/api"
|
||||
import { Detection } from "@/types"
|
||||
|
||||
// Dynamically import the map to avoid SSR issues with Leaflet
|
||||
const DashboardMapContent = dynamic(
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
SelectValue,
|
||||
} from "@/components/ui/select"
|
||||
import { FolderOpen, Package, MapPin } from "lucide-react"
|
||||
import { type Project } from "@/lib/api"
|
||||
import { Project } from "@/types"
|
||||
|
||||
interface FilterSelectorProps {
|
||||
projects: Project[]
|
||||
|
||||
@@ -10,11 +10,13 @@ import {
|
||||
fetchProjects,
|
||||
fetchPackagesByProject,
|
||||
fetchLocationsByPackage,
|
||||
type Project,
|
||||
type Package as PackageType,
|
||||
type Location,
|
||||
type SessionContext
|
||||
} from "@/lib/api"
|
||||
import {
|
||||
Project,
|
||||
Package as PackageType,
|
||||
Location,
|
||||
SessionContext
|
||||
} from "@/types"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
type ProjectSelectionSectionProps = {
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Label } from "@/components/ui/label"
|
||||
import { Progress } from "@/components/ui/progress"
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"
|
||||
import { Upload, Loader2, AlertCircle } from "lucide-react"
|
||||
import type { DetectionData, DetectionType } from "@/lib/types"
|
||||
import type { DetectionData, DetectionType } from "@/types"
|
||||
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
||||
const WS_URL = API_URL?.replace(/^https:\/\//, "wss://").replace(/^http:\/\//, "ws://")
|
||||
|
||||
@@ -11,7 +11,7 @@ import { Target, AlertTriangle, Film, Activity, Gauge, Monitor, SignpostBig, Map
|
||||
// Dynamically import MapModal with SSR disabled (Leaflet requires window object)
|
||||
const MapModal = dynamic(() => import("@/components/map-modal"), { ssr: false })
|
||||
|
||||
import { DetectionData, DetectionType } from "@/lib/types"
|
||||
import { DetectionData, DetectionType } from "@/types"
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
||||
|
||||
Reference in New Issue
Block a user