File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 137137 const router = useRouter ();
138138 const auth = useAuth ();
139139 const { user } = storeToRefs (auth );
140- const probeId = route .params .id as string ;
140+ const probeId = computed (() => route .params .id as string ) ;
141141 const probeDetailsUpdating = ref (false );
142142 const updateProbeDialog = ref (false );
143143 const showMoreIps = ref (false );
146146 const activeTab = useProbeDetailTabs ();
147147 const probePageLink = ref (' /probes' );
148148
149- const { data : probeDetails, error : probeDetailsError } = await useAsyncData <Probe >(() => $directus .request (readItem (' gp_probes' , probeId )));
149+ const { data : probeDetails, error : probeDetailsError } = await useAsyncData (
150+ probeId ,
151+ () => $directus .request <Probe >(readItem (' gp_probes' , probeId .value )),
152+ );
150153
151154 watch (probeDetailsError , (newError ) => {
152155 if (! newError ) {
182185 return probeDetails ?.value ?.altIps ?.slice (0 , 1 ) ?? [];
183186 };
184187
188+ const probeCreditsKey = computed (() => ` credits-${probeId .value } ` );
189+
185190 // HANDLE CREDITS
186191 const { data : probeCreditsPerMonth, error : creditsError } = await useAsyncData (
192+ probeCreditsKey ,
187193 () => $directus .request <{ sum: { amount: number }; adopted_probe: string }[]>(aggregate (' gp_credits_additions' , {
188194 query: {
189195 filter: {
You can’t perform that action at this time.
0 commit comments