Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6주차] Milimate 미션 제출합니다. #8

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f62645c
test
Bokdol11859 Nov 25, 2021
97067e5
Routing set for required pages
Bokdol11859 Nov 25, 2021
7a09149
Merge pull request #1 from Milimate/feature/signup
Bokdol11859 Nov 25, 2021
81a1542
Merge pull request #4 from Milimate/dev
Bokdol11859 Nov 25, 2021
17a8601
Header created
Bokdol11859 Nov 25, 2021
fdb7fdd
Merge pull request #5 from Milimate/feature/signup
Bokdol11859 Nov 25, 2021
56bc25d
Merge pull request #6 from Milimate/dev
Bokdol11859 Nov 25, 2021
7f1bcca
Merge pull request #1 from Milimate/master
Bokdol11859 Nov 25, 2021
79ff88f
Signup page created/ functions needed to be implemented
Bokdol11859 Nov 26, 2021
0030c44
Merge pull request #2 from Milimate/feature/signup
Bokdol11859 Nov 26, 2021
d2d5232
Merge pull request #9 from Milimate/feature/signup
Bokdol11859 Nov 26, 2021
25e3934
Merge pull request #10 from Milimate/dev
Bokdol11859 Nov 26, 2021
9e593b0
Login created
Bokdol11859 Nov 26, 2021
c75e80d
Merge pull request #11 from Milimate/feature/signup
Bokdol11859 Nov 26, 2021
6ab14e4
Merge pull request #14 from Milimate/dev
Bokdol11859 Nov 26, 2021
b022b7e
Merge pull request #3 from Milimate/feature/signup
Bokdol11859 Nov 26, 2021
32d5c0c
mainpage created / routed to each vote page
Bokdol11859 Nov 26, 2021
b44c63d
description fixed
Bokdol11859 Nov 26, 2021
9d87b04
Merge pull request #15 from Milimate/feature/signup
Bokdol11859 Nov 26, 2021
66a8061
Merge pull request #18 from Milimate/dev
Bokdol11859 Nov 26, 2021
126d2e7
Merge pull request #4 from Milimate/dev
Bokdol11859 Nov 26, 2021
08dfddd
backend, frontend voting page created with dummy data
Bokdol11859 Nov 27, 2021
674845c
width fixed
Bokdol11859 Nov 27, 2021
7f8df77
Merge pull request #19 from Milimate/feature/signup
Bokdol11859 Nov 27, 2021
3c85b03
Merge pull request #22 from Milimate/dev
Bokdol11859 Nov 27, 2021
e23f46b
Merge pull request #5 from Milimate/dev
Bokdol11859 Nov 27, 2021
7f39d53
.
Bokdol11859 Nov 27, 2021
442f7a1
Vote Modal Created
Bokdol11859 Dec 24, 2021
e4791c6
vote success notification
Bokdol11859 Dec 24, 2021
e0b603b
candidate image in modal
Bokdol11859 Dec 24, 2021
e3b839e
Merge pull request #23 from Bokdol11859/master
Bokdol11859 Dec 24, 2021
f8d03c8
update
Bokdol11859 Dec 26, 2021
6c0a3d0
disable vote if not logged in
Bokdol11859 Dec 26, 2021
280b1bb
images updated for candidates
Bokdol11859 Dec 26, 2021
51a1010
vote function implemented
Bokdol11859 Dec 26, 2021
20b323a
Merge pull request #24 from Bokdol11859/master
Bokdol11859 Dec 26, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37,177 changes: 37,177 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@nextui-org/react": "^1.0.1-alpha.57",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"@types/jest": "^26.0.15",
"@types/node": "^12.0.0",
"@types/react": "^17.0.0",
"@types/react": "^17.0.37",
"@types/react-dom": "^17.0.0",
"antd": "^4.17.4",
"axios": "^0.24.0",
"bootstrap": "^5.1.3",
"react": "^17.0.2",
"react-bootstrap": "^2.0.2",
"react-dom": "^17.0.2",
"react-router-dom": "^6.0.2",
"react-scripts": "4.0.3",
"typescript": "^4.1.2",
"web-vitals": "^1.0.1"
Expand Down
Binary file added public/images/React.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/images/back1.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/images/back10.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/images/back2.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/images/back3.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/images/back4.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/images/back5.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/images/back6.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/images/back7.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/images/back8.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/images/back9.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/images/django.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/images/front1.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/images/front2.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/images/front3.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/images/front4.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/images/front5.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/images/front6.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/images/front7.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/images/front8.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/images/front9.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/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import "~antd/dist/antd.css";

.Content {
-ms-overflow-style: none;
margin-top: 120px;
}
::-webkit-scrollbar {
display: none;
}
27 changes: 25 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,32 @@
import React from 'react';
import { Routes, Route } from "react-router";
import Signup from "./components/signup/signup.components";
import MainPage from "./components/mainpage/mainpage.components";
import Login from "./components/login/login.components";
import Header from "./header";
import "./App.css";
import Front from "./components/vote/frontend.vote.components";
import Back from "./components/vote/backend.vote.components";
import { useEffect, useState } from "react";
import axios from "axios";

function App() {
const [isLoggedIn, setIsLoggedIn] = useState(false);

return (
<div className="App">

<Header isLoggedIn={isLoggedIn} />
<div className="Content">
<Routes>
<Route path="/" element={<MainPage />} />
<Route
path="/login"
element={<Login setIsLoggedIn={setIsLoggedIn} />}
/>
<Route path="/signup" element={<Signup />} />
<Route path="/frontend" element={<Front isLoggedIn={isLoggedIn} />} />
<Route path="/backend" element={<Back isLoggedIn={isLoggedIn} />} />
</Routes>
</div>
</div>
);
}
Expand Down
50 changes: 50 additions & 0 deletions src/components/login/login.components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import { Input, Spacer, Radio, Button, useInput } from "@nextui-org/react";
import React from "react";
import { Link, useNavigate } from "react-router-dom";

type LoginProps = {
setIsLoggedIn: Function;
};

function Login({ setIsLoggedIn }: LoginProps) {
let navigate = useNavigate();
return (
<>
<div className="Title">
<h2>로그인</h2>
</div>
<div className="Container">
<Input placeholder="아이디" />
<Spacer y={1.5} />
<Input.Password placeholder="비밀번호" />
<Spacer y={1.5} />
<Button
auto
ghost
onClick={() => {
setIsLoggedIn(true);
navigate("/", { replace: true });
}}
>
로그인
</Button>
</div>
<div style={{ textAlign: "center" }}>
<p style={{ marginBottom: "0" }}>계정이 없으신가요?</p>
<p style={{ marginTop: "0" }}>
<Link
to="/signup"
style={{
textDecoration: "none",
fontSize: "0.8rem",
}}
>
회원가입하기
</Link>
</p>
</div>
</>
);
}

export default Login;
10 changes: 10 additions & 0 deletions src/components/mainpage/mainpage.components.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.Cards {
margin-top: 200px;
}
.Cards .Display {
display: flex;
gap: 2%;
}
.Cards .Footer {
text-align: center;
}
46 changes: 46 additions & 0 deletions src/components/mainpage/mainpage.components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { Grid, Card, Row, Text } from "@nextui-org/react";
import { Link } from "react-router-dom";
import "./mainpage.components.css";

function MainPage() {
return (
<div className="Cards">
<Grid.Container justify="center">
<Grid className="Display">
<Link to="/frontend">
<Card bordered hoverable clickable width="500px" height="450px">
<Card.Body noPadding>
<Card.Image
objectFit="cover"
src="/images/React.png"
height="500px"
alt="CEOS 15기 프론트엔드 파트장 투표하러 가기"
/>
</Card.Body>
<Card.Footer className="Footer">
<p>CEOS 15기 프론트엔드 파트장 투표하러 가기</p>
</Card.Footer>
</Card>
</Link>
<Link to="/backend">
<Card bordered hoverable clickable width="500px" height="450px">
<Card.Body noPadding>
<Card.Image
objectFit="cover"
src="/images/django.png"
height="500px"
alt="CEOS 15기 백엔드 파트장 투표하러 가기"
/>
</Card.Body>
<Card.Footer className="Footer">
<p>CEOS 15기 백엔드 파트장 투표하러 가기</p>
</Card.Footer>
</Card>
</Link>
</Grid>
</Grid.Container>
</div>
);
}

export default MainPage;
18 changes: 18 additions & 0 deletions src/components/signup/signup.components.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.Title {
margin-top: 140px;
text-align: center;
margin-bottom: 50px;
}
.Container {
display: flex;
flex-direction: column;
width: 20rem;
justify-content: center;
margin-left: auto;
margin-right: auto;
}

.Container .select {
margin-left: auto;
margin-right: auto;
}
43 changes: 43 additions & 0 deletions src/components/signup/signup.components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { Input, Spacer, Radio, Button, useInput } from "@nextui-org/react";
import React from "react";
import { Link } from "react-router-dom";
import "./signup.components.css";

function Signup() {
return (
<>
<div className="Title">
<h2>회원가입</h2>
</div>
<div className="Container">
<Input placeholder="이름" />
<Spacer y={1.5} />
<Input placeholder="아이디" />
<Spacer y={1.5} />
<Input placeholder="이메일" />
<Spacer y={1.5} />
<Input.Password placeholder="비밀번호" />
<Spacer y={1.5} />
<Button auto ghost>
회원가입
</Button>
</div>
<div style={{ textAlign: "center" }}>
<p style={{ marginBottom: "0" }}>이미 계정이 있으신가요?</p>
<p style={{ marginTop: "0" }}>
<Link
to="/login"
style={{
textDecoration: "none",
fontSize: "0.8rem",
}}
>
로그인하기
</Link>
</p>
</div>
</>
);
}

export default Signup;
72 changes: 72 additions & 0 deletions src/components/vote/BackData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
export default [
{
id: 0,
name: "이수진",
image: "/images/back1.png",
detail: "이수진",
vote: 8,
},
{
id: 1,
name: "서수경",
image: "/images/back2.png",
detail: "서수경",
vote: 7,
},
{
id: 2,
name: "박경준",
image: "/images/back3.png",
detail: "박경준",
vote: 5,
},
{
id: 3,
name: "한혜원",
image: "/images/back4.png",
detail: "한혜원",
vote: 4,
},
{
id: 4,
name: "권민아",
image: "/images/back5.png",
detail: "권민아",
vote: 3,
},
{
id: 5,
name: "정환우",
image: "/images/back6.png",
detail: "정환우",
vote: 3,
},
{
id: 6,
name: "김승우",
image: "/images/back7.png",
detail: "김승우",
vote: 3,
},
{
id: 7,
name: "김윤지",
image: "/images/back8.png",
detail: "김윤지",
vote: 2,
},
{
id: 8,
name: "유준환",
image: "/images/back9.png",
detail: "유준환",
vote: 1,
},
{
id: 9,
name: "김채리",
image: "/images/back10.png",
detail: "김채리",
vote: 0,
},
];
66 changes: 66 additions & 0 deletions src/components/vote/FrontData.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
export default [
{
id: 0,
name: "김정수",
image: "/images/front1.png",
detail: "김정수",
vote: 7,
},
{
id: 1,
name: "박준열",
image: "/images/front2.png",
detail: "박준열",
vote: 5,
},
{
id: 2,
name: "구본준",
image: "/images/front3.png",
detail: "구본준",
vote: 5,
},
{
id: 3,
name: "김주현",
image: "/images/front4.png",
detail: "김주현",
vote: 4,
},
{
id: 4,
name: "김태은",
image: "/images/front5.png",
detail: "김태은",
vote: 3,
},
{
id: 5,
name: "김현재",
image: "/images/front6.png",
detail: "김현재",
vote: 3,
},

{
id: 6,
name: "양기욱",
image: "/images/front7.png",
detail: "양기욱",
vote: 2,
},
{
id: 7,
name: "유시원",
image: "/images/front8.png",
detail: "유시원",
vote: 1,
},
{
id: 8,
name: "이로움",
image: "/images/front9.png",
detail: "이로움",
vote: 1,
},
];
16 changes: 16 additions & 0 deletions src/components/vote/backend.vote.components.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import Candidates from "./candidates.vote.components";

type BackProps = {
isLoggedIn: boolean;
};

function Back({ isLoggedIn }: BackProps) {
return (
<>
<h1 className="Title">CEOS 15기 백엔드 파트장 투표</h1>
<Candidates isLoggedIn={isLoggedIn} part={false} />
</>
);
}

export default Back;
Loading