Update Link->Leafcutter integration

This commit is contained in:
Darren Clarke 2023-05-25 12:37:14 +00:00
parent baa1b32737
commit 495e8338b9
31 changed files with 239 additions and 343 deletions

View file

@ -7,7 +7,6 @@ import { Box, Grid } from "@mui/material";
import { useCookies } from "react-cookie";
import { getTemplates } from "lib/opensearch";
import { Layout } from "components/Layout";
import { checkAuth } from "lib/checkAuth";
import { useAppContext } from "components/AppProvider";
import { PageHeader } from "components/PageHeader";
import { VisualizationBuilder } from "components/VisualizationBuilder";
@ -75,13 +74,7 @@ export default Create;
export const getServerSideProps: GetServerSideProps = async (
context: GetServerSidePropsContext
) => {
const res: any = await checkAuth(context);
const templates = await getTemplates(100);
if (res.redirect) {
return res;
}
res.props.templates = await getTemplates(100);
return res;
return { props: { templates } };
};