Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Login button flashing when navigating to new tab
- Confirm email component flashing when navigating to home page

## [2.0.3](https://github.com/hackmcgill/dashboard/tree/2.0.3) - 2019-12-28

Expand Down
6 changes: 5 additions & 1 deletion src/features/Dashboard/HackerDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export interface IDashboardState {
account: IAccount;
status: HackerStatus;
confirmed: boolean;
loaded: boolean;
}

class HackerDashboardContainer extends React.Component<{}, IDashboardState> {
Expand All @@ -19,6 +20,7 @@ class HackerDashboardContainer extends React.Component<{}, IDashboardState> {
account: Object(),
status: HackerStatus.HACKER_STATUS_NONE,
confirmed: false,
loaded: false,
};
}
public async componentDidMount() {
Expand Down Expand Up @@ -50,9 +52,11 @@ class HackerDashboardContainer extends React.Component<{}, IDashboardState> {
} catch (e) {
this.setState({ confirmed });
}
this.setState({ loaded: true });
}
public render() {
return <StatusPage {...this.state} />;
// this will prevent loading the default confirm email component page if the componentDidMount has not finished it's async methods
return this.state.loaded ? <StatusPage {...this.state} /> : null;
}
}

Expand Down
1 change: 0 additions & 1 deletion src/features/Status/StatusPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
LinkDuo,
Paragraph,
} from '../../shared/Elements';
// import Sidebar from '../Sidebar/Sidebar';

import {
FrontendRoute,
Expand Down