-
+
);
}
}
-export default Flight ;
+export default Flight;
diff --git a/client/src/pages/index.js b/client/src/pages/index.js
index fbb52b4..e26846d 100644
--- a/client/src/pages/index.js
+++ b/client/src/pages/index.js
@@ -1,11 +1,6 @@
-import AddFlight from './addFlight';
-import Flights from './flights';
-import Login from './login';
-import UpdateFlight from './updateFlight';
+import AddFlight from "./addFlight";
+import Flights from "./flights";
+import Login from "./login";
+import UpdateFlight from "./updateFlight";
-export {
- AddFlight,
- Flights,
- Login,
- UpdateFlight
-}
\ No newline at end of file
+export { AddFlight, Flights, Login, UpdateFlight };
diff --git a/client/src/pages/login/index.js b/client/src/pages/login/index.js
index cf2ac97..65b2914 100644
--- a/client/src/pages/login/index.js
+++ b/client/src/pages/login/index.js
@@ -1,21 +1,54 @@
-import React, { Component } from 'react';
+import React, { Component } from "react";
+import { Redirect, withRouter } from "react-router-dom";
-import './login.css';
-import { Input, Button } from '../../components'
+import { Input, Button } from "../../components";
+import "./login.css";
class Login extends Component {
+ state = {
+ isLogin: false,
+ loginInfo: {}
+ };
+
+ handleLogin = e => {
+ e.preventDefault();
+ this.setState({
+ isLogin: !this.state.isLogin
+ });
+ };
+
+ handleTextInputChange = e => {
+ const { loginInfo } = this.state;
+ const updatedLoginInfo = loginInfo;
+ updatedLoginInfo[e.target.name] = e.target.value;
+ this.setState({ loginInfo });
+ };
+
render() {
return (
-
-
Admin Panel
+
+
+
+ {this.state.isLogin &&
}
+
);
}
}
-export default Login;
+export default withRouter(Login);
diff --git a/client/src/pages/login/login.css b/client/src/pages/login/login.css
index 16b3c12..8a58764 100644
--- a/client/src/pages/login/login.css
+++ b/client/src/pages/login/login.css
@@ -1,6 +1,6 @@
.container {
text-align: center;
- background-color: #91ADF630;
+ background-color: #91adf630;
width: 50%;
margin: 0 auto;
height: 600px;
@@ -11,7 +11,7 @@
.header {
margin-top: -43px;
- font-family: 'Volkhov';
+ font-family: "Volkhov";
}
.inputs-group {
diff --git a/client/src/pages/updateFlight/index.js b/client/src/pages/updateFlight/index.js
index 4d5217e..ec11d1a 100644
--- a/client/src/pages/updateFlight/index.js
+++ b/client/src/pages/updateFlight/index.js
@@ -1,33 +1,92 @@
-import React, { Component } from 'react';
+import React, { Component } from "react";
-import { DetailsCard, Input, Button, Header, SideNav, RadioButton} from '../../components'
-import '../addFlight/addflight.css';
+import {
+ DetailsCard,
+ Input,
+ Button,
+ Header,
+ SideNav,
+ RadioButton
+} from "../../components";
+import "../addFlight/addflight.css";
class UpdateFlight extends Component {
+ state = {
+ selectValue: "",
+ form: {}
+ };
+
+ handleFlightUpdate = e => {
+ e.preventDefault();
+ console.log("form submit is going to be handledd here");
+ };
+
+ handleRadioChange = value => {
+ this.setState({ selectValue: value });
+ };
+
+ handleInputChange = e => {
+ const { form } = this.state;
+ const updatedForm = form;
+ updatedForm[e.target.name] = e.target.value;
+ this.setState({ form: updatedForm });
+ };
+
render() {
return (
-