Skip to content

Commit dbe845c

Browse files
authored
Merge pull request #8 from stanbianca/diana
Merged branch "diana"
2 parents a6cd164 + a901723 commit dbe845c

File tree

17 files changed

+240
-149
lines changed

17 files changed

+240
-149
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,7 @@ sketch
158158
!.vscode/extensions.json
159159
*.code-workspace
160160

161+
### other ###
162+
*.txt
163+
161164
# End of https://www.toptal.com/developers/gitignore/api/vscode,react,firebase,node

meetsy/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
work correctly both with client-side routing and a non-root public URL.
2525
Learn how to configure a non-root public URL by running `npm run build`.
2626
-->
27-
<title>React App</title>
27+
<title>Meetsy</title>
2828
</head>
2929
<body>
3030
<noscript>You need to enable JavaScript to run this app.</noscript>

meetsy/src/components/Account/index.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@ import React from 'react';
22
import { AuthUserContext, withAuthorization } from '../Session';
33
import { PasswordForgetForm } from '../PasswordForget';
44
import PasswordChangeForm from '../PasswordChange';
5+
import Firebase from '../Firebase/firebase';
56

67

78
const AccountPage = () => (
89
<AuthUserContext.Consumer>
9-
{authUser => (
10-
<div>
11-
<h1>Account: {authUser.email}</h1>
12-
<PasswordForgetForm />
13-
<PasswordChangeForm />
14-
</div>
15-
)}
16-
</AuthUserContext.Consumer>
10+
{authUser => (
11+
<div>
12+
<h1>Account: {authUser.email}</h1>
13+
<PasswordForgetForm />
14+
<PasswordChangeForm />
15+
</div>
16+
)
17+
}
18+
</AuthUserContext.Consumer>
1719
);
18-
20+
1921
const condition = authUser => !!authUser;
20-
22+
2123
export default withAuthorization(condition)(AccountPage);

meetsy/src/components/Calendar/calendar.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ body {
1111
background: rgb(0, 0, 0) !important;
1212
}
1313

14+
.rbc-btn-group > button:focus {
15+
background-color: #01abf4 !important;
16+
}
17+
1418
.rbc-btn-group > button {
1519
color: white !important;
1620
}

meetsy/src/components/Calendar/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { Calendar, momentLocalizer } from 'react-big-calendar';
22
import moment from 'moment';
3+
import { withAuthorization } from '../Session';
34
import 'react-big-calendar/lib/css/react-big-calendar.css';
45
import './calendar.css';
56

@@ -26,4 +27,5 @@ const MyCalendar = props => (
2627
</div>
2728
)
2829

29-
export default MyCalendar;
30+
const condition = authUser => !!authUser;
31+
export default withAuthorization(condition)(MyCalendar);

meetsy/src/components/Firebase/firebase.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@ class Firebase {
4141
doSignInWithEmailAndPassword = (email, password) =>
4242
this.auth.signInWithEmailAndPassword(email, password);
4343

44-
doSignOut = () => this.auth.signOut();
44+
doSignOut = () => {
45+
this.auth.signOut();
46+
window.location.reload();
47+
}
4548

4649
doPasswordReset = email => this.auth.sendPasswordResetEmail(email);
4750

meetsy/src/components/Landing/MainLanding.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import styled from "styled-components";
3+
import { AuthUserContext, withAuthorization } from '../Session';
34

45
const MainLanding = () => {
56
return (
@@ -25,4 +26,5 @@ h1 {
2526
}
2627
`;
2728

28-
export default MainLanding;
29+
const condition = authUser => !authUser;
30+
export default withAuthorization(condition)(MainLanding);

0 commit comments

Comments
 (0)