
@@ -13,21 +13,15 @@ const VizItem = ({ vizId, vizProps }) => (
);
-function VizList({ items }): JSX.Element | null {
-
+export default function VizList({items}: {items?: string[]}): React.ReactNode {
return (
<>
- {Object.entries(vizzes).map(item => {
- if(items) {
- if(items.indexOf(item[0])===-1) {
- return '';
- }
+ {Object.entries(vizzes as Record
).map(([vizId, vizProps]) => {
+ if (items && items.indexOf(vizId) === -1) {
+ return null;
}
- return ;
+ return ;
})}
>
);
-
}
-
-export default VizList;
diff --git a/src/js/viz/viz_page.tsx b/src/js/viz/viz_page.tsx
index e174480a..9b5fc613 100644
--- a/src/js/viz/viz_page.tsx
+++ b/src/js/viz/viz_page.tsx
@@ -3,12 +3,12 @@ import styles from '../../pages/styles.module.css';
import vizzes from './vizzes';
import VizList from './viz_list';
-const baseUrl = 'https://cloud.flexitanalytics.com'; //'http://carbon1:3030';
+const baseUrl = 'https://cloud.flexitanalytics.com';
-const Highlight = ({children, type}) => (
+const Highlight = ({children, type}: {children: React.ReactNode; type: string}) => (
(
);
-const Iframe = ({src}) => (
-
+const Iframe = ({src, title}: {src: string; title: string}) => (
+
);
-const Examples = ({arr}) => (
- (!arr.length&&'None') || arr.map(example => {
- return (<>
- {example.title?({example.title}):''}
-