Env implementation
This commit is contained in:
@@ -22,7 +22,7 @@ import {
|
||||
type Project
|
||||
} from "@/lib/api"
|
||||
|
||||
const API_URL = "http://127.0.0.1:8000/api/v1"
|
||||
const API_URL = process.env.NEXT_PUBLIC_API_URL
|
||||
|
||||
interface ProjectSummary {
|
||||
project: {
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
import { getVideoFile, clearVideoFile } from "@/lib/video-storage"
|
||||
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
|
||||
|
||||
export default function ResultsPage() {
|
||||
const router = useRouter()
|
||||
|
||||
@@ -18,8 +18,8 @@ import {
|
||||
} from "@/lib/api"
|
||||
import { storeVideoFile } from "@/lib/video-storage"
|
||||
|
||||
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 DetectionType = "pothole-detection" | "sign-board-detection" | "pot-sign-detection"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user