From a6793f922991d326eeb33cf08b245863218eaef7 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 24 Mar 2021 12:27:47 +0100 Subject: fix open page weirdness in a hacky way --- frontend/app/views/graph/graph.actions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'frontend/app/views/graph/graph.actions.js') diff --git a/frontend/app/views/graph/graph.actions.js b/frontend/app/views/graph/graph.actions.js index 4185386..6d5cb51 100644 --- a/frontend/app/views/graph/graph.actions.js +++ b/frontend/app/views/graph/graph.actions.js @@ -41,10 +41,11 @@ export const setHomePageId = (graph, page) => dispatch => { actions.graph.update(updated_graph) } -export const viewPage = (graph, page) => dispatch => { +export const viewPage = (graph, path) => dispatch => { + // for some reason page.show.res is not always set..?? api(dispatch, types.api, 'export', `/api/v1/graph/export/${graph.path}`) .then(result => { console.log(result) - window.open(`${process.env.EXPORT_HOST}/${graph.path}/${page.path}`) + window.open(`${process.env.EXPORT_HOST}${path}`) }) } -- cgit v1.2.3-70-g09d2