-
Notifications
You must be signed in to change notification settings - Fork 2
검색페이지 whereFrom, 팔로우/팔로잉페이지 isFollower persist설정 삭제 #136
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
base: dev
Are you sure you want to change the base?
Changes from 3 commits
baea7cf
5955ddf
6f09fc4
134ad6d
bdb9d9c
46fc84c
4f12b8e
94b3948
d5e4ddb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,11 +66,11 @@ function App() { | |
| </ButtonCafe> | ||
| </FloatButton> | ||
| <WebVer /> | ||
|
|
||
| <Container> | ||
| <Switch> | ||
| <PublickRoute path="/" exact component={Tutorial}/> | ||
| <PublickRoute path="/intro" exact component={Intro} /> | ||
| <PublickRoute path="/" exact component={Tutorial} /> | ||
| <PublickRoute path="/intro" exact component={Intro} /> | ||
| <PublickRoute path="/login" exact component={Login} /> | ||
| <PublickRoute path="/signup" exact component={Signup} /> | ||
| <PublickRoute path="/user/kakao/callback" exact component={Kakao} /> | ||
|
|
@@ -122,7 +122,7 @@ function App() { | |
| exact | ||
| component={UserPageFollowList} | ||
| /> | ||
| <PrivateRoute path="/searchmain" component={SearchMain} /> | ||
| <PrivateRoute path="/searchmain/:wherefrom" component={SearchMain} /> | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 검색페이지를 담당하는 컴포넌트의 path주소마지막에 변수를 설정해준다. |
||
| <PrivateRoute path="/setting" component={Setting} /> | ||
| <NotFound /> | ||
| </Switch> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,7 @@ import { history } from "../redux/configureStore"; | |
| import { useLocation } from "react-router-dom"; | ||
| import { useDispatch, useSelector } from "react-redux"; | ||
| import { resetList } from "./../redux/Modules/searchSlice"; | ||
| import { whereFrom } from "./../redux/Modules/whereFromSlice"; | ||
|
|
||
| const Header = (props) => { | ||
| const dispatch = useDispatch(); | ||
| const location = useLocation().pathname; | ||
|
|
@@ -116,9 +116,8 @@ const Header = (props) => { | |
| <IconInner height="24px"> | ||
| <SearchIcon | ||
| onClick={() => { | ||
| history.push("/searchmain"); | ||
| history.push("/searchmain/cafeboard"); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 카페 후기메인페이지에서 이동했을떄. |
||
| dispatch(resetList()); | ||
| dispatch(whereFrom("cafe")); | ||
| }} | ||
| /> | ||
| </IconInner> | ||
|
|
@@ -151,9 +150,8 @@ const Header = (props) => { | |
| <IconInner height="24px"> | ||
| <SearchIcon | ||
| onClick={() => { | ||
| history.push("/Searchmain"); | ||
| history.push("/Searchmain/bulletinboard"); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 자유게시판 후기메인페이지에서 이동했을떄. |
||
| dispatch(resetList()); | ||
| dispatch(whereFrom("Board")); | ||
| }} | ||
| /> | ||
| </IconInner> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useParans훅을 이용하여 해당하는 값을 받아올 수 있어, 이를 활용하여 분기처리시의 기준값으로 설정해줌.