diff --git a/src/components/account.js b/src/components/account.js index 48ba769..ca74036 100644 --- a/src/components/account.js +++ b/src/components/account.js @@ -1,6 +1,6 @@ import React from 'react'; import { withRouter } from 'react-router'; -import { Image, Row, Col, Typography, Space, Button, Form, Select, Input } from 'antd'; +import { Image, Row, Col, Typography, Button, Form, Input } from 'antd'; import { status, json } from '../utilities/requestHandlers'; import { Link } from "react-router-dom"; @@ -8,8 +8,6 @@ import UserContext from '../contexts/user'; const { Title, Paragraph } = Typography; -const { Option } = Select; - class Account extends React.Component { static contextType = UserContext; @@ -82,7 +80,12 @@ class Account extends React.Component { render() { const user = this.state.user; - + + if (!this.context.user.loggedIn) { + return ( +

Login first in order to see your account details!

+ ) + } /** Returns the data about the user */ return( @@ -100,13 +103,13 @@ render() {

Change your account details here:

- + - + - + diff --git a/src/components/contact.js b/src/components/contact.js index a888b6f..30a011c 100644 --- a/src/components/contact.js +++ b/src/components/contact.js @@ -56,7 +56,7 @@ class ContactForm extends React.Component { - +