Your doctor your treatment
+diff --git a/frontend/src/components/adminLogin.js b/frontend/src/components/adminLogin.js new file mode 100644 index 0000000..133149f --- /dev/null +++ b/frontend/src/components/adminLogin.js @@ -0,0 +1,84 @@ +import React from "react"; +import "./css/adminLogin.css"; +import Navbar from "./nav"; +import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import { faKey, faEnvelope } from "@fortawesome/free-solid-svg-icons"; + +class adminLogin extends React.Component { + constructor(props) { + super(); + this.onChangeAdminEmail = this.onChangeAdminEmail.bind(this); + this.onChangeAdminPassword = this.onChangeAdminPassword.bind(this); + this.onSubmit = this.onSubmit.bind(this); + this.state = { + adminEmail: "", + adminPassword: "", + msg: "", + }; + } + + onChangeAdminEmail(e) { + this.setState({ adminEmail: e.target.value }); + } + onChangeAdminPassword(e) { + this.setState({ adminPassword: e.target.value }); + } + onSubmit(e) { + e.preventDefault(); + console.log("Login Successfull"); + console.log(`ADMIN EMAIL ID : ${this.state.adminEmail}`); + console.log(`ADMIN PASSWORD : ${this.state.adminPassword}`); + if ( + this.state.adminEmail === "admin@gmail.com" && + this.state.adminPassword === "admin1234" + ) { + this.setState({ msg: "WELCOME ADMIN" }); + sessionStorage.setItem("Key_Veriable", "admin@gmail.com"); + this.props.history.push("/adminafterlogin"); + } else { + this.setState({ msg: "INVALID UID OR PASSWORD" }); + } + this.setState({ adminEmail: "", adminPassword: "" }); + } + + render() { + return ( +
Your doctor your treatment
+Health care
++ + For all your family needs +
++ Efficiently unleash cross-media information without cross-media value. Quickly maximize timely deliverables for real-time schemas. Dramatically maintain clicks-and-mortar solutions without functional solutions. +
+Dentist
++ For your child whitest teeths +
++ Completely synergize resource taxing relationships via premier niche markets. Professionally cultivate one-to-one customer service with robust ideas. Dynamically innovate resource-leveling customer service for state of the art customer service. +
+Pediatrician
++ Children medical care +
++ Objectively innovate empowered manufactured products whereas parallel platforms. Holisticly predominate extensible testing procedures for reliable supply chains. Dramatically engage top-line web services vis-a-vis cutting-edge deliverables. +
+