Skip to content

Commit

Permalink
feat(react client): updated app component
Browse files Browse the repository at this point in the history
Related OWASP#192
  • Loading branch information
KoolTheba committed Mar 22, 2020
1 parent 25addff commit 5731cd9
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 91 deletions.
38 changes: 0 additions & 38 deletions apps/react-apirest/client/src/App.css

This file was deleted.

30 changes: 0 additions & 30 deletions apps/react-apirest/client/src/App.jsx

This file was deleted.

35 changes: 35 additions & 0 deletions apps/react-apirest/client/src/components/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import TrackChangesIcon from '@material-ui/icons/TrackChanges';

const useStyles = makeStyles(theme => ({
root: {
flexGrow: 1,
},
menuButton: {
marginRight: theme.spacing(2),
},
title: {
flexGrow: 1,
},
}));

export default function App() {
const classes = useStyles();

return (
<div className={classes.root}>
<AppBar position="static">
<Toolbar>
<TrackChangesIcon />
<Typography variant="h6" className={classes.title}>
Retire<strong>Easy</strong> Employee Retirement Savings Management
</Typography>
</Toolbar>
</AppBar>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React from 'react';
import { render } from '@testing-library/react';
import App from './App';

test('renders learn react link', () => {
test('renders main App', () => {
const { getByText } = render(<App />);
const linkElement = getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
const appComponent = getByText(/Retire/i);
expect(appComponent).toBeInTheDocument();
});
14 changes: 2 additions & 12 deletions apps/react-apirest/client/src/index.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
margin: 0;
}
2 changes: 1 addition & 1 deletion apps/react-apirest/client/src/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import App from './components/App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render(
Expand Down
7 changes: 0 additions & 7 deletions apps/react-apirest/client/src/logo.svg

This file was deleted.

0 comments on commit 5731cd9

Please sign in to comment.