Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/lotte-kokodo/frontend into f…
Browse files Browse the repository at this point in the history
…eat/product-detail
  • Loading branch information
ohjiwon-201733026 committed Oct 13, 2022
2 parents fecbc51 + 21ce7ff commit 89a8638
Show file tree
Hide file tree
Showing 82 changed files with 5,673 additions and 210 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*

<<<<<<< HEAD
# package
package.json
package-lock.json
=======
# IntelliJ
.idea
>>>>>>> origin/dev
Binary file added public/img/main/left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/main/right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/main/timer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/mypage/mypage-top-left-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/mypage/star.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/top/header-hover-rectangle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 6 additions & 9 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />

<!--부트스트랩-->
<!-- Bootstrap -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
Expand All @@ -20,13 +19,6 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>

<!--네이버-->
<script
type="text/javascript"
src="https://static.nid.naver.com/js/naveridlogin_js_sdk_2.0.0.js"
charset="utf-8"
></script>

<!--Fontawesome CDN-->
<link
rel="stylesheet"
Expand All @@ -35,6 +27,11 @@
crossorigin="anonymous"
/>

<!-- Google Font -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Do+Hyeon&display=swap" rel="stylesheet">

<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
5 changes: 5 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
.App {
text-align: center;
font-family: 'Do Hyeon', sans-serif;
}

.strong{
font-size: 10px;
}

.App-logo {
Expand Down
180 changes: 15 additions & 165 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,176 +1,26 @@
import React, {useEffect, useState} from "react"
import {BrowserRouter, Link, Routes, Route} from "react-router-dom"

import ProductDetail from "./pages/Product/productDetail"
import ProductDetailNavBar from "./Components/product/ProductDetailNavBar"
import Login from "./pages/Member/js/login"
import OrderDetailList from "./Components/Order/orderDetailList";
import OrderList from "./Components/Order/orderList";
import Signup from "./pages/Member/js/signup"
import Mypage from "./pages/Member/js/mypage"
import DiscountPolicy from "./pages/DiscountPolicy/js/discountPolicy"

import Home from "./pages/Main/js/home"

import "./pages/Main/css/header.css"
import React from "react"
import {BrowserRouter, Routes, Route} from "react-router-dom"

import Seller from "./pages/seller/main/js/seller"
import Client from "./pages/client/main/js/client"

function App() {
const [inputIdHomeInput, setInputHomeInput] = useState('');
const [isLogin, setIsLogin] = useState(false);

useEffect(() => {
if(localStorage.getItem('token') === null || localStorage.getItem('token') === ""){
setIsLogin(false);
} else {
setIsLogin(true);
}
}, [isLogin]);

const onLogout = () => {
localStorage.removeItem('token');
localStorage.removeItem('memberId');
setIsLogin(false);
alert("로그아웃 됐습니다.");
}

const handleHomeInput = (e) => {
setInputHomeInput(e.target.value);
}

const onClicktotalSearch = () => {

}

return (
<div>

<BrowserRouter>
<header className="header">

<div className="headerTop">
{isLogin ?
<ul className="headerTopUl">
<li className="header-item">
<Link className="header-item-link" to="/">입점신청</Link>
</li>
<li className="header-item">
<Link className="header-item-link" onClick={onLogout} to="/">로그아웃</Link>
</li>
</ul>
:
<ul className="headerTopUl">
<li className="header-item">
<Link className="header-item-link" to="/">입점신청</Link>
</li>
<li className="header-item">
<Link className="header-item-link" to="/signup">회원가입</Link>
</li>
<li className="header-item">
<Link className="header-item-link" to="/login">로그인</Link>
</li>
</ul>
}
</div>

<div className="headerCenter">
<div className="headerCenter-logo">
<Link to="/">KOKODO</Link></div>
<div className="headerCenter-search">
<input type="text" className="headerCenter-mypageCart-home-input" name='input_id' value={inputIdHomeInput} onChange={handleHomeInput} />
<div className="headerCenter-search-overlap">
<button onClick={onClicktotalSearch}>
<img className="headerCenter-search-search" alt="search" src="/img/top/headerCenter-search.png" />
</button>
</div>
</div>
<div className="headerCenter-mypageCart">
{/* <<<<<<< HEAD
<Link to="/">
<img className="headerCenter-mypageCart-home" alt="home" src="/img/top/headerCenter-mypageCart-home.png" />
======= */}
<Link to="/mypage">
<img className="headerCenter-mypageCart-home" alt="mypage" src="img/top/headerCenter-mypageCart-home.png" />
</Link>
<Link to="/">
<img className="headerCenter-mypageCart-cart" alt="cart" src="/img/top/headerCenter-mypageCart-cart.png" />
</Link>
</div>
</div>

</header>

<hr className="headerBottom-hr"></hr>

<nav className="nav">
<div className="navContainer">
<div className="navContainer-category">
<button>
<div className="navContainer-category-overlap">
<div>
<img className="headerCenter-category-line" alt="nav-line" src="/img/top/navContainer-category-Line.png" />
</div>
<div>
<img className="headerCenter-category-line" alt="nav-line" src="/img/top/navContainer-category-Line.png" />
</div>
<div>
<img className="headerCenter-category-line" alt="nav-line" src="/img/top/navContainer-category-Line.png" />
</div>
</div>
<img className="navContainer-category-Rectangle" alt="nav-rec" src="/img/top/navContainer-category-Rectangle.png" />
</button>
</div>

<div className="navContainer-subject">
<ul className="navContainer-subject-ul">
<Link to="/">
<li>베스트</li>
</Link>
<Link to="/">
<li>특가</li>
</Link>
<Link to="/">
<li>프로모션</li>
</Link>
</ul>
</div>

</div>
</nav>

<main>
<div className="container">
<Routes>
<Route path="/login" element={<Login />}></Route>
<Route path="/orderList" element={<OrderList />}></Route>
<Route path="/orderDetailList" element={<OrderDetailList />}></Route>
<Route path="/" element={<Home />}></Route>
<Route path="/signup" element={<Signup />}></Route>
<Route path="/productDetail/:productId" element={<ProductDetail />}></Route>
<Route path="/mypage" element={<Mypage />}></Route>
<Route path="/discountPolicy" element={<DiscountPolicy />}></Route>
</Routes>
</div>
</main>
</BrowserRouter>

<Routes>
{/* Seller */}
<Route path="/seller/*" element={<Seller />}></Route>

{/* Customers */}
<Route path="/*" element={<Client />}></Route>
</Routes>

<footer>
</footer>
</BrowserRouter>
</div>
);
}
// function Home(){

// return (
// <div>
// <div className="container text-center">
// <h2></h2>
// </div>
// </div>
// )
// }

export default App;
// =======
// export default App;
// >>>>>>> 32362a0926af79e4e03808905a32f6d6218e85fd
export default App;
Binary file removed src/Components/images/icon/ico_rating.png
Binary file not shown.
Loading

0 comments on commit 89a8638

Please sign in to comment.