Commit 35c2084e authored by KangMin An's avatar KangMin An
Browse files

Merge branch 'who' into premaster

parents d671b124 ecaf9de8
...@@ -37,7 +37,7 @@ body { ...@@ -37,7 +37,7 @@ body {
color: rgb(129, 129, 129); color: rgb(129, 129, 129);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 0.5em; font-weight: 300;
} }
...@@ -87,7 +87,7 @@ body { ...@@ -87,7 +87,7 @@ body {
} }
#contour { #contour {
padding: 10px; padding-bottom: 1em;
color: rgba(195, 195, 195, 0.753); color: rgba(195, 195, 195, 0.753);
} }
......
...@@ -22,7 +22,9 @@ function EueSuggest() { ...@@ -22,7 +22,9 @@ function EueSuggest() {
<Card style={cardstyled}> <Card style={cardstyled}>
<Card.Title> <Card.Title>
<p>
EUE 제안 EUE 제안
</p>
</Card.Title> </Card.Title>
<Card.Text> <Card.Text>
"에어컨을 줄이시면 더 효율적입니다." "에어컨을 줄이시면 더 효율적입니다."
......
...@@ -50,9 +50,11 @@ function Footer() { ...@@ -50,9 +50,11 @@ function Footer() {
<Row className='text-center w-100 my-2'> <Row className='text-center w-100 my-2'>
<Card style={cardstyled}> <Card style={cardstyled}>
<Card.Title> <Card.Title>
<p>
서버비용 후원하기 서버비용 후원하기
</p>
</Card.Title> </Card.Title>
<Card.Subtitle style={{fontWeight: 'lighter'}}> <Card.Subtitle>
이용하시는데 불편함이 없도록 광고 없이 운영하고 있습니다. <br /> 이용하시는데 불편함이 없도록 광고 없이 운영하고 있습니다. <br />
서버비용 충당 후원금이 남을시 UNICEF 기부하겠습니다. 서버비용 충당 후원금이 남을시 UNICEF 기부하겠습니다.
</Card.Subtitle> </Card.Subtitle>
......
...@@ -4,9 +4,7 @@ import { Spinner, Row, Button } from 'react-bootstrap'; ...@@ -4,9 +4,7 @@ import { Spinner, Row, Button } from 'react-bootstrap';
function Loading() { function Loading() {
return ( return (
<Button id='formbtn' className='d-flex justify-content-center align-items-center m-auto' style={{ width: '200px', height: '200px', flexDirection: 'column' }} disabled> <Button id='formbtn' className='d-flex justify-content-center align-items-center m-auto' style={{ width: '200px', height: '200px', flexDirection: 'column' }} disabled>
<Spinner animation="border" role="status"> <Spinner animation="border" role="status"/>
<span className="sr-only">Loading...</span>
</Spinner>
<br /> <br />
Loading... Loading...
</Button> </Button>
......
...@@ -35,7 +35,6 @@ function MainLayer() { ...@@ -35,7 +35,6 @@ function MainLayer() {
} }
const logined = localStorage.getItem('nickname') const logined = localStorage.getItem('nickname')
const [airUsing, setAirUsing] = useState(false) const [airUsing, setAirUsing] = useState(false)
function aircondiCheck() { function aircondiCheck() {
...@@ -43,6 +42,20 @@ function MainLayer() { ...@@ -43,6 +42,20 @@ function MainLayer() {
localStorage.setItem('using-aircondition', !airUsing); localStorage.setItem('using-aircondition', !airUsing);
} }
useEffect(() => {
const airUsingLocal = localStorage.getItem('using-aircondition')
if (airUsingLocal === 'true') {
console.log('!!', airUsing);
console.log(airUsingLocal);
return setAirUsing(true)
}
else {
console.log('%%', airUsing);
console.log(airUsingLocal);
return setAirUsing(false)
}
});
return ( return (
<Col> <Col>
<Row className='d-flex align-items-center m-auto w-100'> <Row className='d-flex align-items-center m-auto w-100'>
...@@ -54,6 +67,8 @@ function MainLayer() { ...@@ -54,6 +67,8 @@ function MainLayer() {
<Row className='m-auto d-flex justify-content-center w-100'> <Row className='m-auto d-flex justify-content-center w-100'>
<UserInfo /> <UserInfo />
</Row> </Row>
{logined &&
<Form <Form
key='checkbox' className="d-flex justify-content-center w-100" style={{ flexDirection: 'row-reverse' }}> key='checkbox' className="d-flex justify-content-center w-100" style={{ flexDirection: 'row-reverse' }}>
<Form.Check <Form.Check
...@@ -61,8 +76,10 @@ function MainLayer() { ...@@ -61,8 +76,10 @@ function MainLayer() {
id='aircondition-checkbox' id='aircondition-checkbox'
label='에어컨 사용중' label='에어컨 사용중'
onChange={aircondiCheck} onChange={aircondiCheck}
checked={airUsing}
/> />
</Form> </Form>
}
<Row className='d-flex justify-content-center align-items-center my-2 mx-auto w-100'> <Row className='d-flex justify-content-center align-items-center my-2 mx-auto w-100'>
<ButtonGroup vertical className='m-auto' style={{ width: '100%', flexDirection: 'column' }}> <ButtonGroup vertical className='m-auto' style={{ width: '100%', flexDirection: 'column' }}>
......
import React, { useEffect } from 'react' import React, { useEffect } from 'react'
import { Row, Container } from 'react-bootstrap'; import { Row, Container } from 'react-bootstrap';
import { Redirect } from 'react-router-dom';
import Loading from './Loading'; import Loading from './Loading';
// const goHome = setTimeout(window.location.replace('/'), 3000);
function PageNotFound() { function PageNotFound() {
useEffect(() => { useEffect(() => {
setTimeout(window.location.replace('/'), 5000); setTimeout(window.location.replace('/'), 5000);
...@@ -13,12 +9,19 @@ function PageNotFound() { ...@@ -13,12 +9,19 @@ function PageNotFound() {
return ( return (
<Container className='d-flex justify-content-center align-items-center' style={{ flexDirection: 'column', height: '70vh' }} > <Container className='d-flex justify-content-center align-items-center' style={{ flexDirection: 'column', height: '70vh' }} >
<Row style={{marginBottom: '1em', fontSize: '2rem', fontWeight: 'bold' }}>
잘못된 접근 입니다. <br />PAGE NOT FOUND
</Row>
<Row> <Row>
<Loading /> <Loading />
</Row> </Row>
<Row className='m-5'>
<h1 className='d-flex justify-content-center'>
PAGE NOT FOUND
</h1>
<br />
<h3 className='d-flex justify-content-center' style={{fontWeight: '300'}}>
잘못된 접근 입니다.
</h3>
</Row>
</Container> </Container>
) )
} }
......
...@@ -13,7 +13,9 @@ function UserInfo() { ...@@ -13,7 +13,9 @@ function UserInfo() {
const cardstyled = { const cardstyled = {
margin: 'auto', margin: 'auto',
padding: '1em', padding: '1em 0.5em 1em 0.5em',
// paddingTop: '1em',
// paddingBottom: '1em',
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
width: '100%', width: '100%',
...@@ -42,22 +44,37 @@ function UserInfo() { ...@@ -42,22 +44,37 @@ function UserInfo() {
<Col className='text-center pt-3 pb-2 px-0'> <Col className='text-center pt-3 pb-2 px-0'>
<Card style={cardstyled} id='localName'> <Card style={cardstyled} id='localName'>
<Card.Title> <Card.Title>
<strong>
{nickname ? {nickname ?
`${nickname}` <h2>
{`${nickname}`}
</h2>
: :
<> <h2>
GUEST GUEST
</> </h2>
}, 환영합니다. }
</strong>
<p style={{ fontWeight: '300', margin: '0' }}>
환영합니다
</p>
</Card.Title> </Card.Title>
<hr />
<Row style={{ alignItems: 'center', margin: 'auto', justifyContent: 'center' }}> <Row style={{ alignItems: 'center', margin: 'auto', justifyContent: 'center' }}>
<Card.Subtitle> <Card.Subtitle>
{localname_emd ? {localname_emd ?
`${localname_doe} ${localname_sgg} ${localname_emd}` <p className='mb-2'>
{`${localname_doe}`}
<br />
{`${localname_sgg}`}
<br />
{`${localname_emd}`}
</p>
: :
<> <p className='mb-2'>
지역을 입력해 주세요 로그인 이용 가능합니다
</> </p>
} }
</Card.Subtitle> </Card.Subtitle>
{nickname && {nickname &&
...@@ -68,10 +85,14 @@ function UserInfo() { ...@@ -68,10 +85,14 @@ function UserInfo() {
</Button> </Button>
} }
</Row> </Row>
{nickname &&
<p className='w-100 justify-content-center m-auto'>
<hr /> <hr />
환경을 향한 노력 <br /> 환경을 향한 노력 <br />
<strong>OOO </strong> <strong>OOO </strong>
</p>
}
</Card> </Card>
</Col> </Col>
</Row> </Row>
......
// # Global Routes export const routes = {
const BASE = "/api"; home: '/',
signup: '/signup',
// # Data Routes login: 'login',
const DATA = "/data"; localcode: '/local_code',
// Data - Collector }
const DATA_INPUT = "/input";
// Data - Consumer
const DATA_USER = "/user";
const DATA_OUTSIDE = "/outside";
// # Local Code Data
const LOCCODE = "/loccode";
// # Auth
const SIGNUP = "/signup";
const LOGIN = "/login";
const CONFIRM = "/confirm";
const EDIT_PROFILE = "/edit-profile";
// # Detail Object
const DETAIL = "/:id";
const routes = {
base: BASE,
data: DATA,
dataInput: DATA_INPUT,
dataUser: DATA_USER,
dataOutside: DATA_OUTSIDE,
locCode: LOCCODE,
signup: SIGNUP,
login: LOGIN,
confirm: CONFIRM,
editProfile: EDIT_PROFILE,
Detail: (id) => {
if (id) {
return `/${id}`;
} else {
return DETAIL;
}
},
};
export default routes;
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