Skip to content

Commit 4af1e3c

Browse files
authored
Merge pull request #13 from eunhye-ahn/revert-11-frontend/group-vote-page
Revert "[FE] 댓글 : 작성, 조회, 삭제 기능 구현"
2 parents 13d6ce9 + 2822055 commit 4af1e3c

File tree

76 files changed

+104
-2451
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+104
-2451
lines changed

polling-app-client/.idea/.gitignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

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

Lines changed: 0 additions & 6 deletions
This file was deleted.

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

Lines changed: 0 additions & 8 deletions
This file was deleted.

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

Lines changed: 0 additions & 9 deletions
This file was deleted.

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

Lines changed: 0 additions & 6 deletions
This file was deleted.

polling-app-client/package-lock.json

Lines changed: 1 addition & 36 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: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
"name": "polling-app-client",
33
"version": "0.1.0",
44
"private": true,
5-
"proxy": "http://localhost:8080",
65
"dependencies": {
76
"antd": "^3.2.2",
87
"react": "^16.5.2",
98
"react-dom": "^16.5.2",
109
"react-router-dom": "^4.3.1",
11-
"react-scripts": "1.1.5",
12-
"slick-carousel": "^1.8.1"
10+
"react-scripts": "1.1.5"
1311
},
1412
"scripts": {
1513
"start": "react-app-rewired start",

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

Lines changed: 8 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import HomeDashboard from '../components/Dashboard/HomeDashboard';
2-
import GroupPollList from '../components/Dashboard/GroupPollList';
3-
import MyComments from '../components/Dashboard/MyComments';
4-
51
import React, { Component } from 'react';
62
import './App.css';
73
import {
@@ -13,6 +9,7 @@ import {
139
import { getCurrentUser } from '../util/APIUtils';
1410
import { ACCESS_TOKEN } from '../constants';
1511

12+
import PollList from '../poll/PollList';
1613
import NewPoll from '../poll/NewPoll';
1714
import Login from '../user/login/Login';
1815
import Signup from '../user/signup/Signup';
@@ -22,7 +19,6 @@ import NotFound from '../common/NotFound';
2219
import LoadingIndicator from '../common/LoadingIndicator';
2320
import PrivateRoute from '../common/PrivateRoute';
2421

25-
2622
import { Layout, notification } from 'antd';
2723
const { Content } = Layout;
2824

@@ -103,41 +99,19 @@ class App extends Component {
10399
<Content className="app-content">
104100
<div className="container">
105101
<Switch>
106-
<Route exact path="/"
107-
render={(props) => (
108-
<HomeDashboard
109-
currentUser={this.state.currentUser}
110-
isAuthenticated={this.state.isAuthenticated}
111-
handleLogout={this.handleLogout}
112-
{...props}
113-
/>
114-
)}
115-
/>
116-
117-
118-
119-
<Route path="/login"
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"
120107
render={(props) => <Login onLogin={this.handleLogin} {...props} />}></Route>
121108
<Route path="/signup" component={Signup}></Route>
122-
123109
<Route path="/users/:username"
124110
render={(props) => <Profile isAuthenticated={this.state.isAuthenticated} currentUser={this.state.currentUser} {...props} />}>
125111
</Route>
126112
<PrivateRoute authenticated={this.state.isAuthenticated} path="/poll/new" component={NewPoll} handleLogout={this.handleLogout}></PrivateRoute>
127-
<PrivateRoute
128-
path="/groups/:groupId/polls"
129-
component={GroupPollList}
130-
authenticated={this.state.isAuthenticated}
131-
/>
132-
133-
<PrivateRoute
134-
path="/polls/:pollId/comments"
135-
component={MyComments}
136-
authenticated={this.state.isAuthenticated}
137-
/>
138-
139-
<Route component={NotFound} />
140-
</Switch>
113+
<Route component={NotFound}></Route>
114+
</Switch>
141115
</div>
142116
</Content>
143117
</Layout>

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ class AppHeader extends Component {
3434
<img src={pollIcon} alt="poll" className="poll-icon" />
3535
</Link>
3636
</Menu.Item>,
37-
3837
<Menu.Item key="/profile" className="profile-menu">
3938
<ProfileDropdownMenu
4039
currentUser={this.props.currentUser}
Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
import React from 'react';
2-
import { Route, Redirect } from "react-router-dom";
3-
4-
const PrivateRoute = ({ component: Component, render, authenticated, ...rest }) => (
5-
<Route
6-
{...rest}
7-
render={props =>
8-
authenticated ? (
9-
render ? render(props) : <Component {...props} />
10-
) : (
11-
<Redirect
12-
to={{
13-
pathname: '/login',
14-
state: { from: props.location }
15-
}}
16-
/>
17-
)
18-
}
19-
/>
2+
import {
3+
Route,
4+
Redirect
5+
} from "react-router-dom";
6+
7+
8+
const PrivateRoute = ({ component: Component, authenticated, ...rest }) => (
9+
<Route
10+
{...rest}
11+
render={props =>
12+
authenticated ? (
13+
<Component {...rest} {...props} />
14+
) : (
15+
<Redirect
16+
to={{
17+
pathname: '/login',
18+
state: { from: props.location }
19+
}}
20+
/>
21+
)
22+
}
23+
/>
2024
);
21-
22-
export default PrivateRoute;
25+
26+
export default PrivateRoute

polling-app-client/src/components/Dashboard/GroupActions.css

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)