fix(stats): run worker effects directly
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
||||
type ModelCatalogCost,
|
||||
type ModelCatalogEntry,
|
||||
} from "../model-catalog"
|
||||
import { statsRuntime } from "../../stats-runtime"
|
||||
import { runStatsEffect } from "../../stats-runtime"
|
||||
import {
|
||||
applyThemePreference,
|
||||
Footer,
|
||||
@@ -96,7 +96,7 @@ const worldBorderPath = worldPath(mesh(worldTopology, worldCountryGeometries, (a
|
||||
|
||||
const getModelData = query(async (lab: string, model: string) => {
|
||||
"use server"
|
||||
return statsRuntime.runPromise(getStatsModelData(model, lab))
|
||||
return runStatsEffect(getStatsModelData(model, lab))
|
||||
}, "getStatsModelData")
|
||||
|
||||
export default function StatsModel() {
|
||||
|
||||
@@ -16,7 +16,7 @@ import {
|
||||
type ModelCatalogEntry,
|
||||
type ModelCatalogLab,
|
||||
} from "../model-catalog"
|
||||
import { statsRuntime } from "../../stats-runtime"
|
||||
import { runStatsEffect } from "../../stats-runtime"
|
||||
import {
|
||||
applyThemePreference,
|
||||
Footer,
|
||||
@@ -46,7 +46,7 @@ const labFooterLinks: readonly HeaderLink[] = [
|
||||
|
||||
const getLabData = query(async (lab: string) => {
|
||||
"use server"
|
||||
return statsRuntime.runPromise(getStatsLabData(lab))
|
||||
return runStatsEffect(getStatsLabData(lab))
|
||||
}, "getStatsLabData")
|
||||
|
||||
export default function StatsLab() {
|
||||
|
||||
Reference in New Issue
Block a user