diff --git a/new/package.json b/new/package.json index 9ea66672..ba448028 100644 --- a/new/package.json +++ b/new/package.json @@ -22,6 +22,26 @@ "test": "react-scripts test", "eject": "react-scripts eject" }, + "prettier": { + "printWidth": 100, + "tabWidth": 4, + "useTabs": false, + "semi": true, + "singleQuote": false, + "quoteProps": "as-needed", + "jsxSingleQuote": false, + "trailingComma": "none", + "bracketSpacing": true, + "jsxBracketSameLine": false, + "arrowParens": "avoid", + "requirePragma": false, + "insertPragma": false, + "proseWrap": "preserve", + "htmlWhitespaceSensitivity": "css", + "vueIndentScriptAndStyle": false, + "endOfLine": "lf", + "embeddedLanguageFormatting": "auto" + }, "eslintConfig": { "extends": [ "react-app", diff --git a/new/src/App.tsx b/new/src/App.tsx index 34610129..205b7e1f 100644 --- a/new/src/App.tsx +++ b/new/src/App.tsx @@ -30,4 +30,4 @@ function App() { ) } -export default App; \ No newline at end of file +export default App; diff --git a/new/src/components/ScenarioOverview/ScenarioOverview.tsx b/new/src/components/ScenarioOverview/ScenarioOverview.tsx index 58784d4d..f44e01be 100644 --- a/new/src/components/ScenarioOverview/ScenarioOverview.tsx +++ b/new/src/components/ScenarioOverview/ScenarioOverview.tsx @@ -91,32 +91,23 @@ export function MenuBar() { return( - - SUMMARY} /> - - - All Scenarios - } - /> - - - - Failed Scenarios - } - /> - - - - Pending Scenarios - } - /> + SUMMARY} /> + + {['All Scenarios', 'Failed Scenarios', 'Pending Scenarios'].map((scenario, index) => ( + + + {scenario} + } + /> + + ))} + + {/* Workshop: Use forEach to implement missing subitems. */} TAGS} /> diff --git a/new/src/components/Scenarios/SingleScenarioView.tsx b/new/src/components/Scenarios/SingleScenarioView.tsx index 33e2e086..e4011f1f 100644 --- a/new/src/components/Scenarios/SingleScenarioView.tsx +++ b/new/src/components/Scenarios/SingleScenarioView.tsx @@ -14,7 +14,7 @@ export function SingleScenarioView(props: { reportName: string; scenario: Scenar - + {/* Workshop: Extract to new component. */}
diff --git a/new/src/components/casesTable/CasesTable.tsx b/new/src/components/casesTable/CasesTable.tsx index 2fbb70df..7021740e 100644 --- a/new/src/components/casesTable/CasesTable.tsx +++ b/new/src/components/casesTable/CasesTable.tsx @@ -28,4 +28,4 @@ interface Column { export function casesTable(props: CasesTableProps) { return (
); -} \ No newline at end of file +} diff --git a/new/src/index.tsx b/new/src/index.tsx index 032464fb..ba9c4453 100644 --- a/new/src/index.tsx +++ b/new/src/index.tsx @@ -1,12 +1,27 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; +import i18n from "i18next"; +import { initReactI18next } from "react-i18next"; +import en from "./i18n/en.json"; import App from './App'; import reportWebVitals from './reportWebVitals'; const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); + +i18n.use(initReactI18next).init({ + resources: { + en: { translation: en } + }, + lng: "en", + fallbackLng: "en", + interpolation: { + escapeValue: false + } +}); + root.render(