generated from vanHeemstraSystems/template-default-repository
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
61888c4
commit 7482a74
Showing
4 changed files
with
80,161 additions
and
26,253 deletions.
There are no files selected for viewing
44 changes: 15 additions & 29 deletions
44
threagile-monitoring/src/threagile_monitoring/components/App.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,20 @@ | ||
// import { React, Router, Route, Switch } from 'react' | ||
import {React, Router} from 'react'; | ||
import { React, Switch } from 'react' | ||
import { Routes, Route } from 'react-router-dom' | ||
import Layout from './Layout' | ||
import NoMatch from './NoMatch' | ||
|
||
function App() { | ||
const App = () => { | ||
return ( | ||
<div> | ||
<h1>Hello, World!</h1> | ||
<p>This is a React component.</p> | ||
<Router> | ||
|
||
</Router> | ||
</div> | ||
); | ||
<> | ||
<Routes> | ||
<Switch> | ||
<Route exact path='/' element={<Layout showHome />} /> | ||
<Route path='/dashboards' element={<Layout showDashboard />} /> | ||
<Route path='*' component={() => <NoMatch />} /> | ||
</Switch> | ||
</Routes> | ||
</> | ||
) | ||
} | ||
|
||
|
||
// const App = () => { | ||
// return ( | ||
// <div className='App'> | ||
// <Router> | ||
// <Switch> | ||
// <Route exact path='/' component={() => <Layout showHome />} /> | ||
// <Route | ||
// exact | ||
// path='/dashboards' | ||
// component={() => <Layout showDashboard />} | ||
// /> | ||
// </Switch> | ||
// </Router> | ||
// </div> | ||
// ) | ||
// } | ||
|
||
export default App |
9 changes: 9 additions & 0 deletions
9
threagile-monitoring/src/threagile_monitoring/components/NoMatch.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
function NoMatch() { | ||
return ( | ||
<div className='NoMatch'> | ||
No Match Found | ||
</div> | ||
); | ||
} | ||
|
||
export default NoMatch; |
8 changes: 8 additions & 0 deletions
8
threagile-monitoring/src/threagile_monitoring/components/NoMatch.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { render, screen } from '@testing-library/react' | ||
import NoMatch from './NoMatch' | ||
|
||
test('renders No Match text', () => { | ||
render(<NoMatch />) | ||
const textElement = screen.getByText('No Match') | ||
expect(textElement).toBeInTheDocument() | ||
}) |
Oops, something went wrong.