Skip to content

Commit 62f553a

Browse files
committed
apiUtil 이용해서 api 접근
2 parents d77d865 + 2b5f024 commit 62f553a

23 files changed

+589
-15
lines changed

polling-app-client/.idea/.gitignore

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

polling-app-client/.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

polling-app-client/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

polling-app-client/.idea/polling-app-client.iml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

polling-app-client/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

polling-app-client/package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

polling-app-client/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"name": "polling-app-client",
33
"version": "0.1.0",
44
"private": true,
5+
"proxy": "http://localhost:8080",
6+
57
"dependencies": {
68
"antd": "^3.2.2",
79
"react": "^16.5.2",

polling-app-client/src/app/App.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import HomeDashboard from '../components/Dashboard/HomeDashboard';
2+
13
import React, { Component } from 'react';
24
import './App.css';
35
import {
@@ -9,7 +11,6 @@ import {
911
import { getCurrentUser } from '../util/APIUtils';
1012
import { ACCESS_TOKEN } from '../constants';
1113

12-
import PollList from '../poll/PollList';
1314
import NewPoll from '../poll/NewPoll';
1415
import Login from '../user/login/Login';
1516
import Signup from '../user/signup/Signup';
@@ -99,13 +100,23 @@ class App extends Component {
99100
<Content className="app-content">
100101
<div className="container">
101102
<Switch>
102-
<Route exact path="/"
103-
render={(props) => <PollList isAuthenticated={this.state.isAuthenticated}
104-
currentUser={this.state.currentUser} handleLogout={this.handleLogout} {...props} />}>
105-
</Route>
106-
<Route path="/login"
103+
<Route exact path="/"
104+
render={(props) => (
105+
<HomeDashboard
106+
currentUser={this.state.currentUser}
107+
isAuthenticated={this.state.isAuthenticated}
108+
handleLogout={this.handleLogout}
109+
{...props}
110+
/>
111+
)}
112+
/>
113+
114+
115+
116+
<Route path="/login"
107117
render={(props) => <Login onLogin={this.handleLogin} {...props} />}></Route>
108118
<Route path="/signup" component={Signup}></Route>
119+
109120
<Route path="/users/:username"
110121
render={(props) => <Profile isAuthenticated={this.state.isAuthenticated} currentUser={this.state.currentUser} {...props} />}>
111122
</Route>

polling-app-client/src/common/AppHeader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class AppHeader extends Component {
3434
<img src={pollIcon} alt="poll" className="poll-icon" />
3535
</Link>
3636
</Menu.Item>,
37+
3738
<Menu.Item key="/profile" className="profile-menu">
3839
<ProfileDropdownMenu
3940
currentUser={this.props.currentUser}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.poll-container {
2+
width: 100%;
3+
max-width: 600px; /* 또는 위에 그룹 카드랑 똑같은 너비 */
4+
margin: 0 auto;
5+
background-color: white;
6+
padding: 20px;
7+
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
8+
border-radius: 10px;
9+
}
10+
11+
12+
.group-actions-text {
13+
flex: 1;
14+
}
15+
16+
.group-actions-text h3 {
17+
font-size: 1.2rem;
18+
margin-bottom: 8px;
19+
color: #333;
20+
}
21+
22+
.group-actions-text p {
23+
font-size: 0.95rem;
24+
color: #666;
25+
line-height: 1.5;
26+
}
27+
28+
.group-actions-buttons {
29+
display: flex;
30+
gap: 12px;
31+
}
32+
33+
.create-btn {
34+
background-color: #2196f3;
35+
color: white;
36+
border: none;
37+
padding: 10px 16px;
38+
font-size: 0.95rem;
39+
border-radius: 6px;
40+
cursor: pointer;
41+
transition: background-color 0.3s;
42+
}
43+
44+
.create-btn:hover {
45+
background-color: #1976d2;
46+
}
47+
48+
.join-btn {
49+
background-color: #f1f1f1;
50+
color: #333;
51+
border: none;
52+
padding: 10px 16px;
53+
font-size: 0.95rem;
54+
border-radius: 6px;
55+
cursor: pointer;
56+
transition: background-color 0.3s;
57+
}
58+
59+
.join-btn:hover {
60+
background-color: #ddd;
61+
}
62+
63+
.group-actions-container {
64+
background-color: #fff;
65+
padding: 24px;
66+
border-radius: 12px;
67+
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
68+
display: flex;
69+
justify-content: space-between;
70+
align-items: center;
71+
width: 100%;
72+
}

0 commit comments

Comments
 (0)