Build and type fixes
This commit is contained in:
parent
d5bd58ac3e
commit
656f3fbe71
64 changed files with 1878 additions and 1501 deletions
|
|
@ -1,12 +1,16 @@
|
|||
/* eslint-disable no-underscore-dangle */
|
||||
import { GetServerSideProps, GetServerSidePropsContext } from "next";
|
||||
import { NextPage, GetServerSideProps, GetServerSidePropsContext } from "next";
|
||||
import { Client } from "@opensearch-project/opensearch";
|
||||
import Head from "next/head";
|
||||
import { Layout } from "components/Layout";
|
||||
import { VisualizationDetail } from "components/VisualizationDetail";
|
||||
import { checkAuth } from "lib/checkAuth";
|
||||
|
||||
const Visualization = ({ visualization }) => (
|
||||
type VisualizationProps = {
|
||||
visualization: any;
|
||||
};
|
||||
|
||||
const Visualization: NextPage<VisualizationProps> = ({ visualization }) => (
|
||||
<Layout>
|
||||
<Head>
|
||||
<title>Digital Threat Dashboard – Leafcutter</title>
|
||||
|
|
@ -43,7 +47,8 @@ export const getServerSideProps: GetServerSideProps = async (
|
|||
const response = rawResponse.body;
|
||||
|
||||
const hits = response.hits.hits.filter(
|
||||
(hit) => hit._id.split(":")[1] === visualizationID[0]
|
||||
// @ts-expect-error
|
||||
(hit: any) => hit._id.split(":")[1] === visualizationID[0]
|
||||
);
|
||||
const hit = hits[0];
|
||||
res.props.visualization = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue