Skip to content

Commit

Permalink
Merge pull request #8 from stanbianca/diana
Browse files Browse the repository at this point in the history
Merged branch "diana"
  • Loading branch information
DianaVasiliu authored Jun 10, 2021
2 parents a6cd164 + a901723 commit dbe845c
Show file tree
Hide file tree
Showing 17 changed files with 240 additions and 149 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,7 @@ sketch
!.vscode/extensions.json
*.code-workspace

### other ###
*.txt

# End of https://www.toptal.com/developers/gitignore/api/vscode,react,firebase,node
2 changes: 1 addition & 1 deletion meetsy/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Meetsy</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
22 changes: 12 additions & 10 deletions meetsy/src/components/Account/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,22 @@ import React from 'react';
import { AuthUserContext, withAuthorization } from '../Session';
import { PasswordForgetForm } from '../PasswordForget';
import PasswordChangeForm from '../PasswordChange';
import Firebase from '../Firebase/firebase';


const AccountPage = () => (
<AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account: {authUser.email}</h1>
<PasswordForgetForm />
<PasswordChangeForm />
</div>
)}
</AuthUserContext.Consumer>
{authUser => (
<div>
<h1>Account: {authUser.email}</h1>
<PasswordForgetForm />
<PasswordChangeForm />
</div>
)
}
</AuthUserContext.Consumer>
);

const condition = authUser => !!authUser;

export default withAuthorization(condition)(AccountPage);
4 changes: 4 additions & 0 deletions meetsy/src/components/Calendar/calendar.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ body {
background: rgb(0, 0, 0) !important;
}

.rbc-btn-group > button:focus {
background-color: #01abf4 !important;
}

.rbc-btn-group > button {
color: white !important;
}
Expand Down
4 changes: 3 additions & 1 deletion meetsy/src/components/Calendar/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Calendar, momentLocalizer } from 'react-big-calendar';
import moment from 'moment';
import { withAuthorization } from '../Session';
import 'react-big-calendar/lib/css/react-big-calendar.css';
import './calendar.css';

Expand All @@ -26,4 +27,5 @@ const MyCalendar = props => (
</div>
)

export default MyCalendar;
const condition = authUser => !!authUser;
export default withAuthorization(condition)(MyCalendar);
5 changes: 4 additions & 1 deletion meetsy/src/components/Firebase/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ class Firebase {
doSignInWithEmailAndPassword = (email, password) =>
this.auth.signInWithEmailAndPassword(email, password);

doSignOut = () => this.auth.signOut();
doSignOut = () => {
this.auth.signOut();
window.location.reload();
}

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

Expand Down
4 changes: 3 additions & 1 deletion meetsy/src/components/Landing/MainLanding.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react'
import styled from "styled-components";
import { AuthUserContext, withAuthorization } from '../Session';

const MainLanding = () => {
return (
Expand All @@ -25,4 +26,5 @@ h1 {
}
`;

export default MainLanding;
const condition = authUser => !authUser;
export default withAuthorization(condition)(MainLanding);
Loading

0 comments on commit dbe845c

Please sign in to comment.