fix(web): use runtime origin for status-chain fetches
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
|
||||
import type { AwoooPStatusChain } from '@/components/awooop/status-chain'
|
||||
import { API_V1_URL } from '@/lib/config'
|
||||
import { getRuntimeApiV1BaseUrl } from '@/lib/runtime-api-base'
|
||||
|
||||
interface UseIncidentStatusChainsOptions {
|
||||
incidentIds: string[]
|
||||
@@ -56,7 +56,7 @@ export function useIncidentStatusChains({
|
||||
const fetchStatusChain = async (incidentId: string): Promise<AwoooPStatusChain | null> => {
|
||||
const params = new URLSearchParams({ project_id: projectId, incident_id: incidentId })
|
||||
try {
|
||||
const response = await fetch(`${API_V1_URL}/platform/status-chain?${params.toString()}`, {
|
||||
const response = await fetch(`${getRuntimeApiV1BaseUrl()}/platform/status-chain?${params.toString()}`, {
|
||||
cache: 'no-store',
|
||||
signal: controller.signal,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user