Skip to content

Commit

Permalink
테스트 시 나왔던 버그 및 개선 사항 수정 (#78)
Browse files Browse the repository at this point in the history
* flx : 자유게시판 css 수정

* fix : 구매 페이지 오류 발생해도 스니펫 떠있는 버그 수정

* fix : oAuth 리다이렉트 url 수정
  • Loading branch information
dnr14 authored Feb 15, 2022
1 parent 1ba701f commit ad991d1
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 41 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: React build
on:
push:
branches: [ action ] # action Branch에서 push 이벤트가 일어났을 때만 실행
branches: [ release ] # action Branch에서 push 이벤트가 일어났을 때만 실행

jobs:
build:
runs-on: [ubuntu-latest]
runs-on: ubuntu-18.04
steps:
- name: Checkout source code. # 레포지토리 체크아웃
uses: actions/checkout@v2
Expand Down
16 changes: 10 additions & 6 deletions src/components/FreeBoard/FreeBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,17 @@ const FreeBoard = () => {
</div>
</div>
<div>
<Button variant="contained" color="mainDarkBrown">
<Link to="/community/freeboard">목록보기</Link>
</Button>
{user && (
<Button variant="contained" color="info">
<Link to="insert">게시글 등록</Link>
<Link to="/community/freeboard">
<Button variant="contained" color="mainDarkBrown">
목록보기
</Button>
</Link>
{user && (
<Link to="insert">
<Button variant="contained" color="info">
게시글 등록
</Button>
</Link>
)}
{user?.id === userId && (
<>
Expand Down
35 changes: 14 additions & 21 deletions src/components/FreeBoardList/FreeBoardList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ const FreeBoardList = () => {
</div>
<div>
<span>{dateArrayFormat(boardDate)[0]}</span>
<span>{dateArrayFormat(boardDate)[1]}</span>
</div>
</div>
);
Expand All @@ -175,27 +174,21 @@ const FreeBoardList = () => {
</Stack>
)}
<Styled.FreeBoardListSearch onSubmit={handleSubmit(onSubmit)}>
<div>
<Controller
name="title"
control={control}
rules={titleOptions}
render={({ field }) => (
<TextField
{...field}
type="text"
size={min900 ? "medium" : "small"}
color="mainDarkBrown"
placeholder="자유게시판 제목을 입력해주세요."
/>
)}
/>
<Button variant="contained" size={min900 ? "large" : "small"} color="mainDarkBrown" type="submit">
검색
</Button>
</div>
<ErrorMessage message={errors.title?.message} />
<Controller
name="title"
control={control}
rules={titleOptions}
render={({ field }) => (
<TextField {...field} type="text" color="mainDarkBrown" placeholder="자유게시판 제목을 입력해주세요." />
)}
/>
<Button variant="contained" size={min900 ? "large" : "small"} color="mainDarkBrown" type="submit">
검색
</Button>
</Styled.FreeBoardListSearch>
<div>
<ErrorMessage message={errors.title?.message} />
</div>
</Styled.FreeBoardListWrapper>
</>
);
Expand Down
19 changes: 11 additions & 8 deletions src/components/FreeBoardList/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@ import styled from "styled-components";

export const FreeBoardListWrapper = styled.div`
margin: 20px 0;
.MuiInputBase-root {
height: 100%;
}
`;

export const FreeBoardListRow = styled.div`
min-height: 400px;
min-height: 300px;
& > div {
display: flex;
align-items: center;
Expand All @@ -32,7 +36,7 @@ export const FreeBoardListRow = styled.div`
flex-wrap: wrap;
gap: 10px;
justify-content: center;
font-size: 15px;
font-size: 13px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down Expand Up @@ -130,12 +134,11 @@ export const Empty = styled.div`
`;

export const FreeBoardListSearch = styled.form`
& > div {
margin-top: 20px;
justify-content: center;
display: flex;
gap: 20px;
}
height: 45px;
margin-top: 20px;
justify-content: center;
display: flex;
gap: 20px;
input {
width: 250px;
}
Expand Down
5 changes: 4 additions & 1 deletion src/components/Header/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ const Header = () => {
<Link to="/book">리뷰</Link>
</span>
<span>
<Link to="/community">커뮤니티</Link>
<span>커뮤니티</span>
<ul>
<li>
<Link to="/community">공지사항</Link>
</li>
<li>
<Link to="/community/freeboard">자유게시판</Link>
</li>
Expand Down
2 changes: 1 addition & 1 deletion src/components/OrderForm/OrderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const OrderForm = ({ usedBook }: Types.OrderFormProps) => {
const message = errorHandler(e);
handlePopupMessage(false, message);
} finally {
setIsLoading(true);
setIsLoading(false);
}
};

Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ const KAKAO_CLIENT_ID = process.env.KAKAO_CLIENT_ID ?? "";
const KAKAO_CLIENT_KEY = process.env.KAKAO_JDK_KEY ?? "";
const PAYMENT_IMP_KEY = process.env.PAYMENT_IMP_KEY ?? "";
const KAKAO_REDIRECT_PATH_DEV = "http://localhost:3000/oAuth/kakao";
const KAKAO_REDIRECT_PATH_PRO = "http://www.react-dev.p-e.kr/oAuth/kakao";
const KAKAO_REDIRECT_PATH_PRO = "http://dzjv6uzpvhcwz.cloudfront.net/oAuth/kakao";
const KAKAO_OAUTH_URL_DEV = `https://kauth.kakao.com/oauth/authorize?client_id=${KAKAO_CLIENT_ID}&redirect_uri=${KAKAO_REDIRECT_PATH_DEV}&response_type=code`;
const KAKAO_OAUTH_URL_PRO = `https://kauth.kakao.com/oauth/authorize?client_id=${KAKAO_CLIENT_ID}&redirect_uri=${KAKAO_REDIRECT_PATH_PRO}&response_type=code`;
const NAVER_OAUTH_URL_DEV =
"https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=qtbZhYGrYVHhLWesnRyJ&redirect_uri=http://localhost:3000/oAuth/naver&state=state";
const NAVER_OAUTH_URL_PRO =
"https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=qtbZhYGrYVHhLWesnRyJ&redirect_uri=http://www.react-dev.p-e.kr/oAuth/naver&state=state";
"https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=qtbZhYGrYVHhLWesnRyJ&redirect_uri=http://dzjv6uzpvhcwz.cloudfront.net/oAuth/naver&state=state";
const BASE_URL_DEV = "http://localhost:3000/api";
const BASE_URL_PRO = "http://3.34.100.122:8080/api";
const CHAT_BASE_URL = "http://ec2-3-34-249-63.ap-northeast-2.compute.amazonaws.com:8081";
Expand Down

0 comments on commit ad991d1

Please sign in to comment.