Commit 033d3da9 authored by 이재연's avatar 이재연
Browse files

로그인 기능 구현중...

parent c856eca6
[{"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js":"1","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js":"2","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js":"3","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Admin.js":"4","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\ShoppingCart.js":"5","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Signup.js":"6","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Login.js":"7","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Home.js":"8","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Payment.js":"9","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\MainNav.js":"10","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\SubNav.js":"11"},{"size":1078,"mtime":1608970065236,"results":"12","hashOfConfig":"13"},{"size":652,"mtime":1608705187305,"results":"14","hashOfConfig":"13"},{"size":362,"mtime":499162500000,"results":"15","hashOfConfig":"13"},{"size":351,"mtime":1608970621902,"results":"16","hashOfConfig":"13"},{"size":365,"mtime":1608970610659,"results":"17","hashOfConfig":"13"},{"size":1453,"mtime":1608982060226,"results":"18","hashOfConfig":"13"},{"size":305,"mtime":1608978425980,"results":"19","hashOfConfig":"13"},{"size":303,"mtime":1608969605724,"results":"20","hashOfConfig":"13"},{"size":309,"mtime":1608969608040,"results":"21","hashOfConfig":"13"},{"size":208,"mtime":1608969598585,"results":"22","hashOfConfig":"13"},{"size":206,"mtime":1608969599915,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"1f8h90z",{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"33","messages":"34","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"35","messages":"36","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"37","messages":"38","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"39","messages":"40","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"41","messages":"42","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"43","messages":"44","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"45","messages":"46","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js",["47","48","49"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js",[],["50","51"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Admin.js",["52","53","54","55"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\ShoppingCart.js",["56","57","58","59"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Signup.js",["60","61","62","63"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Login.js",["64","65","66"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Home.js",["67","68","69"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Payment.js",["70","71","72"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\MainNav.js",["73","74","75","76"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\SubNav.js",["77","78","79","80"],{"ruleId":"81","severity":1,"message":"82","line":7,"column":8,"nodeType":"83","messageId":"84","endLine":7,"endColumn":13},{"ruleId":"81","severity":1,"message":"85","line":8,"column":8,"nodeType":"83","messageId":"84","endLine":8,"endColumn":20},{"ruleId":"81","severity":1,"message":"86","line":9,"column":8,"nodeType":"83","messageId":"84","endLine":9,"endColumn":15},{"ruleId":"87","replacedBy":"88"},{"ruleId":"89","replacedBy":"90"},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"94","line":2,"column":10,"nodeType":"83","messageId":"84","endLine":2,"endColumn":18},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"94","line":2,"column":10,"nodeType":"83","messageId":"84","endLine":2,"endColumn":18},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"94","line":2,"column":10,"nodeType":"83","messageId":"84","endLine":2,"endColumn":18},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"95","line":2,"column":10,"nodeType":"83","messageId":"84","endLine":2,"endColumn":14},{"ruleId":"81","severity":1,"message":"91","line":1,"column":17,"nodeType":"83","messageId":"84","endLine":1,"endColumn":25},{"ruleId":"81","severity":1,"message":"92","line":1,"column":27,"nodeType":"83","messageId":"84","endLine":1,"endColumn":36},{"ruleId":"81","severity":1,"message":"93","line":1,"column":38,"nodeType":"83","messageId":"84","endLine":1,"endColumn":44},{"ruleId":"81","severity":1,"message":"95","line":2,"column":10,"nodeType":"83","messageId":"84","endLine":2,"endColumn":14},"no-unused-vars","'Admin' is defined but never used.","Identifier","unusedVar","'ShoppingCart' is defined but never used.","'Payment' is defined but never used.","no-native-reassign",["96"],"no-negated-in-lhs",["97"],"'useState' is defined but never used.","'useEffect' is defined but never used.","'useRef' is defined but never used.","'Redirect' is defined but never used.","'Link' is defined but never used.","no-global-assign","no-unsafe-negation"] [{"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js":"1","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js":"2","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js":"3","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Admin.js":"4","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\ShoppingCart.js":"5","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Signup.js":"6","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Login.js":"7","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Home.js":"8","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Payment.js":"9","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\MainNav.js":"10","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\SubNav.js":"11"},{"size":1078,"mtime":1609128888500,"results":"12","hashOfConfig":"13"},{"size":652,"mtime":1608705187305,"results":"14","hashOfConfig":"13"},{"size":362,"mtime":499162500000,"results":"15","hashOfConfig":"13"},{"size":351,"mtime":1608970621902,"results":"16","hashOfConfig":"13"},{"size":365,"mtime":1608970610659,"results":"17","hashOfConfig":"13"},{"size":5099,"mtime":1609239072978,"results":"18","hashOfConfig":"13"},{"size":2947,"mtime":1609236978314,"results":"19","hashOfConfig":"13"},{"size":303,"mtime":1608969605724,"results":"20","hashOfConfig":"13"},{"size":309,"mtime":1608969608040,"results":"21","hashOfConfig":"13"},{"size":208,"mtime":1608969598585,"results":"22","hashOfConfig":"13"},{"size":206,"mtime":1608969599915,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"26","usedDeprecatedRules":"27"},"1f8h90z",{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"27"},{"filePath":"32","messages":"33","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"34","usedDeprecatedRules":"27"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"37","usedDeprecatedRules":"27"},{"filePath":"38","messages":"39","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"42","messages":"43","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"44","usedDeprecatedRules":"27"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"47","usedDeprecatedRules":"27"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"50","usedDeprecatedRules":"27"},{"filePath":"51","messages":"52","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"53","usedDeprecatedRules":"27"},"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\index.js",["54","55","56"],"import React from 'react';\r\nimport ReactDOM from 'react-dom';\r\nimport { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom';\r\nimport Home from './Pages/Home';\r\nimport Login from './Pages/Login';\r\nimport Signup from './Pages/Signup';\r\nimport Admin from './Pages/Admin';\r\nimport ShoppingCart from './Pages/ShoppingCart';\r\nimport Payment from './Pages/Payment';\r\nimport reportWebVitals from './reportWebVitals';\r\nimport 'bootstrap/dist/css/bootstrap.min.css';\r\n\r\nReactDOM.render(\r\n <React.StrictMode>\r\n <Router>\r\n <Switch>\r\n <Route exact path=\"/\" component={Home} />\r\n <Route path=\"/login\" component={Login} />\r\n <Route path=\"/signup\" component={Signup} />\r\n <Redirect path=\"/\" to=\"/\" />\r\n </Switch>\r\n </Router>\r\n </React.StrictMode>,\r\n document.getElementById('root')\r\n);\r\n\r\n// If you want to start measuring performance in your app, pass a function\r\n// to log results (for example: reportWebVitals(console.log))\r\n// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals\r\nreportWebVitals();\r\n",["57","58"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\App.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\reportWebVitals.js",[],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Admin.js",["59","60","61","62"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport { Redirect } from 'react-router-dom';\r\nimport Nav1 from '../Components/MainNav';\r\nimport Nav2 from '../Components/SubNav';\r\n\r\nfunction Admin() {\r\n\r\n return (\r\n <div>\r\n <Nav1 />\r\n <Nav2 />\r\n \r\n </div>\r\n )\r\n}\r\n\r\nexport default Admin","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\ShoppingCart.js",["63","64","65","66"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport { Redirect } from 'react-router-dom';\r\nimport Nav1 from '../Components/MainNav';\r\nimport Nav2 from '../Components/SubNav';\r\n\r\nfunction ShoppingCart() {\r\n\r\n return (\r\n <div>\r\n <Nav1 />\r\n <Nav2 />\r\n \r\n </div>\r\n )\r\n}\r\n\r\nexport default ShoppingCart","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Signup.js",["67","68","69","70","71"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Login.js",["72","73","74"],"C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Home.js",["75","76","77"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport Nav1 from '../Components/MainNav';\r\nimport Nav2 from '../Components/SubNav';\r\n\r\nfunction Home() {\r\n\r\n return (\r\n <div>\r\n <Nav1 />\r\n <Nav2 />\r\n \r\n </div>\r\n )\r\n}\r\n\r\nexport default Home","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Pages\\Payment.js",["78","79","80"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport Nav1 from '../Components/MainNav';\r\nimport Nav2 from '../Components/SubNav';\r\n\r\nfunction Payment() {\r\n\r\n return (\r\n <div>\r\n <Nav1 />\r\n <Nav2 />\r\n \r\n </div>\r\n )\r\n}\r\n\r\nexport default Payment","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\MainNav.js",["81","82","83","84"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport { Link } from 'react-router-dom';\r\n\r\nfunction MainNav() {\r\n\r\n return (\r\n <div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default MainNav","C:\\Users\\이재연\\Desktop\\2020\\shopping-mall\\client\\src\\Components\\SubNav.js",["85","86","87","88"],"import React, { useState, useEffect, useRef } from 'react';\r\nimport { Link } from 'react-router-dom';\r\n\r\nfunction SubNav() {\r\n\r\n return (\r\n <div>\r\n </div>\r\n )\r\n}\r\n\r\nexport default SubNav",{"ruleId":"89","severity":1,"message":"90","line":7,"column":8,"nodeType":"91","messageId":"92","endLine":7,"endColumn":13},{"ruleId":"89","severity":1,"message":"93","line":8,"column":8,"nodeType":"91","messageId":"92","endLine":8,"endColumn":20},{"ruleId":"89","severity":1,"message":"94","line":9,"column":8,"nodeType":"91","messageId":"92","endLine":9,"endColumn":15},{"ruleId":"95","replacedBy":"96"},{"ruleId":"97","replacedBy":"98"},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"102","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":18},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"102","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":18},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"102","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":18},{"ruleId":"89","severity":1,"message":"103","line":6,"column":8,"nodeType":"91","messageId":"92","endLine":6,"endColumn":22},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"102","line":5,"column":17,"nodeType":"91","messageId":"92","endLine":5,"endColumn":25},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"104","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":14},{"ruleId":"89","severity":1,"message":"99","line":1,"column":17,"nodeType":"91","messageId":"92","endLine":1,"endColumn":25},{"ruleId":"89","severity":1,"message":"100","line":1,"column":27,"nodeType":"91","messageId":"92","endLine":1,"endColumn":36},{"ruleId":"89","severity":1,"message":"101","line":1,"column":38,"nodeType":"91","messageId":"92","endLine":1,"endColumn":44},{"ruleId":"89","severity":1,"message":"104","line":2,"column":10,"nodeType":"91","messageId":"92","endLine":2,"endColumn":14},"no-unused-vars","'Admin' is defined but never used.","Identifier","unusedVar","'ShoppingCart' is defined but never used.","'Payment' is defined but never used.","no-native-reassign",["105"],"no-negated-in-lhs",["106"],"'useState' is defined but never used.","'useEffect' is defined but never used.","'useRef' is defined but never used.","'Redirect' is defined but never used.","'FormCheckInput' is defined but never used.","'Link' is defined but never used.","no-global-assign","no-unsafe-negation"]
\ No newline at end of file \ No newline at end of file
import logo from './logo.svg'; import logo from './logo.svg';
import './App.css'; import './App.css';
import { Button } from 'react-bootstrap'; import { Button } from 'react-bootstrap';
import { Router } from 'react-router-dom';
import Login from './Login'
import LogoutButton from './LogoutButton'
import {signIn} from './auth'
function App() { function App() {
function btnfunc(){ const [user,setUser]=useState(null);
alert("hi")
console.log("") const authenticated =user !=null;
}
return ( const login =({id, password}) => setUser(signIn({id,password}));
<div className="App">
<header className="App-header"> const logout=()=>setUser(null);
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
} }
export default App; export default App;
const users=[
{ id:'wodus', password:'123'},
{id:'kim', password:'456'},
]
export function signIn({id,password}){
const user=users.find(user=>user.id===id && user.password===password);
if (user===undefined) throw new Error();
return user;
}
\ No newline at end of file
import React from 'react'
import {Route, Redirect} from "react-router-dom"
function AuthRoute({})
\ No newline at end of file
...@@ -5,8 +5,19 @@ import { Form, Col, Container, Button, Row } from 'react-bootstrap' ...@@ -5,8 +5,19 @@ import { Form, Col, Container, Button, Row } from 'react-bootstrap'
import { Link , Redirect} from 'react-router-dom' import { Link , Redirect} from 'react-router-dom'
function Login() { function Login(authenticated,login,location) {
const [id, setId] = useState("");
const [password,setPassword]= useState("");
const handleClick =() => {
try {
Login({id,password})
} catch(e) {
alert("Failed to login")
setId("")
setPassword("")
}
}
return ( return (
<div> <div>
...@@ -24,7 +35,12 @@ function Login() { ...@@ -24,7 +35,12 @@ function Login() {
<Form.Row> <Form.Row>
<Form.Label for="id">User Name</Form.Label> <Form.Label for="id">User Name</Form.Label>
<Col> <Col>
<Form.Control type="text" id="id" className="mx-sm-3" size="sm" placeholder="User Name"></Form.Control> <Form.Control
type="text"
value={id}
onChange={({target:{value}})=>setId(value)}
className="mx-sm-3" size="sm" placeholder="User Name">
</Form.Control>
</Col> </Col>
</Form.Row> </Form.Row>
</Form.Group> </Form.Group>
...@@ -33,11 +49,15 @@ function Login() { ...@@ -33,11 +49,15 @@ function Login() {
<Form.Row> <Form.Row>
<Form.Label for="password">Password</Form.Label> <Form.Label for="password">Password</Form.Label>
<Col> <Col>
<Form.Control type="password" id="password" className="mx-sm-3" size="sm" placeholder="Password"></Form.Control> <Form.Control
type="password"
value={password}
onChange={({target:{value}})=>setPassword(value)}
className="mx-sm-3" size="sm" placeholder="Password"></Form.Control>
</Col> </Col>
</Form.Row> </Form.Row>
</Form.Group> </Form.Group>
<Button variant="outline-dark" type="submit" block>Login</Button> <Button variant="outline-dark" type="submit" onClick={handleClick} block>Login</Button>
<div className="loginLine"> <div className="loginLine">
<Link to="/signup">SignUp?</Link> <Link to="/signup">SignUp?</Link>
</div> </div>
......
import React from 'react'
import {withRouter} from 'react-router-dom'
function LogoutButton({logout,history}){
const handleClick = () =>{
logout()
history.push("/")
}
return <button onClick={handleClick}>Logout</button>
}
export default withRouter(LogoutButton)
\ No newline at end of file
...@@ -3,12 +3,14 @@ import { Redirect } from 'react-router-dom'; ...@@ -3,12 +3,14 @@ import { Redirect } from 'react-router-dom';
import Nav1 from '../Components/MainNav'; import Nav1 from '../Components/MainNav';
import Nav2 from '../Components/SubNav'; import Nav2 from '../Components/SubNav';
import { Form, Col, Container, Button, Row } from 'react-bootstrap' import { Form, Col, Container, Button, Row } from 'react-bootstrap'
import FormCheckInput from 'react-bootstrap/esm/FormCheckInput';
function Signup() { function Signup() {
return ( return (
<div> <div>
<Nav1 /> <Nav1 />
<Nav2 /> <Nav2 />
<Container className="my-5"> <Container className="my-5">
...@@ -45,7 +47,7 @@ function Signup() { ...@@ -45,7 +47,7 @@ function Signup() {
<Col as={Row}> <Col as={Row}>
<Form.Control type="text" id="number1" size="sm" maxlength="6" className="mx-sm-3" style={{width:'120px'}}></Form.Control> <Form.Control type="text" id="number1" size="sm" maxlength="6" className="mx-sm-3" style={{width:'120px'}}></Form.Control>
- -
<Form.Control type="text" id="number1" size="sm" maxlength="1" className="mx-sm-3" style={{width:'25px'}}></Form.Control> <Form.Control type="text" id="number2" size="sm" maxlength="1" className="mx-sm-3" style={{width:'25px'}}></Form.Control>
****** ******
</Col> </Col>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment