diff --git a/sports-matcher/client/src/components/AuthenticationGuard.js b/sports-matcher/client/src/components/AuthenticationGuard.js index d9f3634..f96a8da 100644 --- a/sports-matcher/client/src/components/AuthenticationGuard.js +++ b/sports-matcher/client/src/components/AuthenticationGuard.js @@ -23,7 +23,11 @@ export default class AuthenticationGuard extends React.Component { } render() { - return null; + if (this.context.user) { + return this.props.children; + } else { + return null; + } } } @@ -33,4 +37,5 @@ AuthenticationGuard.defaultProps = { AuthenticationGuard.propTypes = { accessLevel: propTypes.number, + children: propTypes.any }; \ No newline at end of file diff --git a/sports-matcher/client/src/components/SportInfoCard.js b/sports-matcher/client/src/components/SportInfoCard.js index 14477e9..c1c909f 100644 --- a/sports-matcher/client/src/components/SportInfoCard.js +++ b/sports-matcher/client/src/components/SportInfoCard.js @@ -11,7 +11,7 @@ export default class SportInfoCard extends React.Component { {this.props.sport.name} - {this.props.sport.minPlayers.toString()} + Requires a minimum of {this.props.sport.minPlayers.toString()} players. {this.props.sport.description} diff --git a/sports-matcher/client/src/pages/Dashboard.js b/sports-matcher/client/src/pages/Dashboard.js index fe878a3..5703982 100644 --- a/sports-matcher/client/src/pages/Dashboard.js +++ b/sports-matcher/client/src/pages/Dashboard.js @@ -41,32 +41,31 @@ export default class Dashboard extends React.Component { render() { return ( -
- - -

- - - - -
-

Available Matches

- -
-
-

Available Sports

- -
- - -
-
+ +
+ +

+ + + + +
+

Available Matches

+ +
+
+

Available Sports

+ +
+
+
+
); } } \ No newline at end of file diff --git a/sports-matcher/client/src/pages/NewAdmin.js b/sports-matcher/client/src/pages/NewAdmin.js index a224a24..d8fe446 100644 --- a/sports-matcher/client/src/pages/NewAdmin.js +++ b/sports-matcher/client/src/pages/NewAdmin.js @@ -177,38 +177,37 @@ export default class Admin extends React.Component { render() { return (
- - - -
-

Administration

- - -
- - {this.renderTableHead()} - - {this.renderTableData()} - {/* {this.matchUserTableData()} */} - -
- -
+ + +
+

Administration

+ + +
+ + {this.renderTableHead()} + + {this.renderTableData()} + {/* {this.matchUserTableData()} */} + +
+
+
); }