Env implementation
This commit is contained in:
@@ -90,10 +90,10 @@ export function RecentAnalysesTable({ videos, isLoading, onViewResults }: Recent
|
||||
<div className="text-right flex-shrink-0 w-20">
|
||||
<p className="text-sm font-bold text-foreground">
|
||||
{video.detection_type === "pothole-detection"
|
||||
? video.unique_potholes ?? 0
|
||||
? video.unique_pothole ?? 0
|
||||
: video.detection_type === "pot-sign-detection"
|
||||
? (video.unique_potholes ?? 0) + (video.unique_signboards ?? 0)
|
||||
: video.unique_signboards ?? 0}
|
||||
? (video.unique_pothole ?? 0) + (video.unique_defected_sign_board ?? 0) + (video.unique_good_sign_board ?? 0)
|
||||
: (video.unique_defected_sign_board ?? 0) + (video.unique_good_sign_board ?? 0)}
|
||||
</p>
|
||||
<p className="text-[10px] text-muted-foreground uppercase">Detections</p>
|
||||
</div>
|
||||
|
||||
@@ -10,8 +10,8 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@
|
||||
import { Upload, Loader2, AlertCircle } from "lucide-react"
|
||||
import type { DetectionData, DetectionType } from "@/lib/types"
|
||||
|
||||
const API_URL = "http://127.0.0.1:8000/api/v1"
|
||||
const WS_URL = "ws://127.0.0.1:8000/api/v1"
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
||||
const WS_URL = API_URL?.replace(/^https?:\/\//, "wss://")
|
||||
|
||||
|
||||
type UploadSectionProps = {
|
||||
|
||||
@@ -13,7 +13,7 @@ const MapModal = dynamic(() => import("@/components/map-modal"), { ssr: false })
|
||||
|
||||
import { DetectionData, DetectionType } from "@/lib/types"
|
||||
|
||||
const API_URL = "http://127.0.0.1:8000/api/v1"
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user