fix: embed bug
This commit is contained in:
parent
132deea7b3
commit
2ee82cdd15
|
@ -5,6 +5,7 @@ import { DashboardItem } from "../../../backend/dashboards";
|
||||||
import { DisplayForecasts } from "../../../web/display/DisplayForecasts";
|
import { DisplayForecasts } from "../../../web/display/DisplayForecasts";
|
||||||
import { FrontendForecast } from "../../../web/platforms";
|
import { FrontendForecast } from "../../../web/platforms";
|
||||||
import { getDashboardForecastsByDashboardId } from "../../../web/worker/getDashboardForecasts";
|
import { getDashboardForecastsByDashboardId } from "../../../web/worker/getDashboardForecasts";
|
||||||
|
import { reqToBasePath } from "../../../web/utils";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
dashboardForecasts: FrontendForecast[];
|
dashboardForecasts: FrontendForecast[];
|
||||||
|
@ -21,6 +22,7 @@ export const getServerSideProps: GetServerSideProps<Props> = async (
|
||||||
const { dashboardItem, dashboardForecasts } =
|
const { dashboardItem, dashboardForecasts } =
|
||||||
await getDashboardForecastsByDashboardId({
|
await getDashboardForecastsByDashboardId({
|
||||||
dashboardId,
|
dashboardId,
|
||||||
|
basePath: reqToBasePath(context.req), // required on server side to find the API endpoint
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!dashboardItem) {
|
if (!dashboardItem) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user