diff --git a/tslint.json b/tslint.json index 12a0431d..695ef2fb 100644 --- a/tslint.json +++ b/tslint.json @@ -1,15 +1,17 @@ { "extends": ["tslint:latest", "tslint-config-prettier"], "rules": { + "class-name": true, + "curly": true, + "interface-name": [true, "never-prefix"], "no-string-throw": true, - "no-unused-expression": true, "no-duplicate-variable": true, - "curly": true, - "class-name": true, + "no-implicit-dependencies": false, + "no-unused-expression": true, + "object-literal-sort-keys": false, + "ordered-imports": false, "semicolon": [true, "never"], - "triple-equals": true, - "interface-name": [true, "never-prefix"], - "object-literal-sort-keys": false + "triple-equals": true }, "defaultSeverity": "warning", "no-submodule-imports": false diff --git a/web-app/.storybook/config.ts b/web-app/.storybook/config.ts index 52c66c69..35c6a012 100644 --- a/web-app/.storybook/config.ts +++ b/web-app/.storybook/config.ts @@ -1,4 +1,4 @@ -// import '@alifd/next/dist/next.css' +import '@alifd/next/dist/next.css' import { configure } from '@storybook/react' import '../src/styles/index.css' diff --git a/web-app/src/Routes.tsx b/web-app/src/Routes.tsx index 47dcf494..4fe7527c 100644 --- a/web-app/src/Routes.tsx +++ b/web-app/src/Routes.tsx @@ -12,16 +12,34 @@ interface Props { const styles = { page: { - width: window.innerWidth, - height: window.innerHeight, + margin: 0, backgroundColor: 'white', }, } const Routes = ({ state }: Props) => { + const [dimensions, setDimensions] = React.useState({ + width: window.innerWidth - 20, + height: window.innerHeight - 20, + }) + + // solution for windows getting off size + // without adding multiple listeners + React.useEffect(() => { + const dimensionsInterval = setInterval(() => { + setDimensions({ + width: window.innerWidth - 20, + height: window.innerHeight - 20, + }) + }, 5000) + return () => { + clearInterval(dimensionsInterval) + } + }) + // TODO: refactor cond to user and accept first route as if/else if return ( -
+
diff --git a/web-app/src/components/Stage/index.tsx b/web-app/src/components/Stage/index.tsx index e6f96a13..a5c552df 100644 --- a/web-app/src/components/Stage/index.tsx +++ b/web-app/src/components/Stage/index.tsx @@ -38,8 +38,6 @@ const Stage = ({ stage, steps, onNextStage, complete }: Props) => { const activeIndex = stepList.findIndex((stepId: string) => { return steps[stepId].status.active }) - // only display up until the active step - const filteredStepList = stepList.slice(0, activeIndex + 1) return (
@@ -48,7 +46,7 @@ const Stage = ({ stage, steps, onNextStage, complete }: Props) => {
- {filteredStepList.map((stepId: string, index: number) => { + {stepList.map((stepId: string, index: number) => { const step = steps[stepId] return ( , document.getElementById('root') as HTMLElement)