Skip to content

Commit

Permalink
Merge pull request #55 from joog-lim/develop
Browse files Browse the repository at this point in the history
v1.0.1
  • Loading branch information
iseolin76 authored Sep 24, 2021
2 parents 20c40dd + 61096de commit 2510245
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 12 deletions.
15 changes: 15 additions & 0 deletions src/components/algorithms/algorithms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Header from "./item/headerPresenter";
import { AlgorithmsProps } from "./algorithmsContainer";

const Algorithms: React.FC<AlgorithmsProps> = (p: AlgorithmsProps) => {
console.log(p.data.reason);
return (
<article className={style.algorithmsBox}>
<Header
Expand All @@ -16,6 +17,20 @@ const Algorithms: React.FC<AlgorithmsProps> = (p: AlgorithmsProps) => {
/>
<h4>{p.data.title}</h4>
<p>{p.data.content}</p>
{
{
REJECTED: (
<>
<h4>거절 μ‚¬μœ </h4> <p>{p.data.reason}</p>
</>
),
DELETED: (
<>
<h4>μ‹ κ³  μ‚¬μœ </h4> <p>{p.data.reason}</p>
</>
),
}[p.data.status]
}
</article>
);
};
Expand Down
4 changes: 3 additions & 1 deletion src/components/algorithms/item/headerContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ export const getDate = (timestamp: number): string => {
if (date.getHours() < 7) time = "μƒˆλ²½";
else if (date.getHours() < 12) time = "μ˜€μ „";
else time = "μ˜€ν›„";
return `${date.getFullYear()}λ…„ ${date.getMonth()}μ›” ${date.getDate()}일 ${time}`;
return `${date.getFullYear()}λ…„ ${
date.getMonth() + 1
}μ›” ${date.getDate()}일 ${time}`;
};
5 changes: 5 additions & 0 deletions src/components/algorithms/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
font-weight: 700;
margin: 10px 0;
}
p {
line-height: 25px;
white-space: pre-wrap;
word-break: break-all;
}
@media (max-width: c.$laptop) {
width: calc(100vw - 40px);
}
Expand Down
17 changes: 9 additions & 8 deletions src/components/descriptions/descContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export const descRule = () => {
및 읡λͺ…μ„± 보μž₯을 λͺ©μ μœΌλ‘œ ν•œλ‹€.
<h2 className={s.title}>제 2μ‘° κ²Œμ‹œκΈ€</h2>
<h3 className={s.title}>κ²Œμ‹œμ— κ΄€ν•œ κ·œμΉ™ 제 1ν•­:</h3>
<p className={s.answer}>
<article className={s.answer}>
<span>
λ‹€μŒκ³Ό 같은 κ²Œμ‹œλ¬Όμ˜ 경우 반렀 μ²˜λ¦¬κ°€ λ˜κ±°λ‚˜, μ‚­μ œκ°€ 될 수 μžˆλ‹€.
</span>
Expand Down Expand Up @@ -149,15 +149,16 @@ export const descRule = () => {
12. κ΄€λ¦¬μžμ˜ νŒλ‹¨ μ•„λž˜, 반절 μ΄μƒμ˜ κ΄€λ¦¬μžλ“€μ΄ λ¬Έμ œκ°€ μžˆλ‹€κ³  νŒλ‹¨ν•œ
경우
</h4>
</p>
<h4 className={s.bold}>13. 도배성 κ²Œμ‹œκΈ€μΌ 경우</h4>
</article>
<h3 className={s.title}>
제 2ν•­: 제 2μ‘° 1ν•­ 2ν˜Έμ— ν•΄λ‹Ήν•˜λŠ” κ²Œμ‹œκΈ€μ΄ 곡읡을 λͺ©μ μœΌλ‘œ ν•˜λŠ” κ³ λ°œμ„±
제보일 경우,
<br />
<br />
κ΄€λ¦¬μžλ“€μ˜ 회의 μ•„λž˜ κ²Œμ‹œλ  수 μžˆλ‹€. 단 λ‹€μŒ 기쀀듀이 μ—„κ²©νžˆ μ μš©λœλ‹€.
</h3>
<p className={s.answer}>
<article className={s.answer}>
<h4 className={s.bold}>
1. μ‹€λͺ… 거둠의 경우 μ΄ˆμ„±μ²˜λ¦¬λ‚˜ λΈ”λΌμΈλ“œ 처리둜 μˆ˜μ •λœλ‹€.
</h4>
Expand All @@ -167,23 +168,23 @@ export const descRule = () => {
<h4 className={s.bold}>3. μΆ”μΈ‘μ„± λ‚΄μš©μ΄ ν¬ν•¨λ˜μ–΄μžˆμœΌλ©΄ μ•ˆλœλ‹€.</h4>
<h4 className={s.bold}>4. μ‚¬μ‹€λ§Œ ν¬ν•¨λ˜μ–΄ μžˆμ–΄μ•Ό ν•œλ‹€.</h4>
<h4 className={s.bold}>5. 비약적인 논리 μ „κ°œκ°€ 있으면 μ•ˆλœλ‹€.</h4>
</p>
</article>
<h3 className={s.title}>
제 3ν•­: 이 외에 제 2μ‘° 1ν•­μ˜ 기쀀에 ν•΄λ‹Ήλ˜λŠ” μ œλ³΄λ”λΌλ„,
<br />
<br />
κ΄€λ¦¬μžμ˜ μž¬λŸ‰μœΌλ‘œ κ²Œμ‹œκΈ€μ΄ κ²Œμ‹œλ  수 μžˆλ‹€. 단, λ‹€μŒ 기쀀듀이 μ μš©λœλ‹€.
</h3>
<p className={s.answer}>
<article className={s.answer}>
<h4 className={s.bold}>
1. 홍보λ₯Ό λͺ©μ μœΌλ‘œ ν•˜λŠ” κ²Œμ‹œκΈ€μΌ 경우, λ””μŠ€μ½”λ“œ λŒ€λ‚˜λ¬΄ 숲 μ„œλ²„λ₯Ό 톡해
κ΄€λ¦¬μžμ—κ²Œ 문의λ₯Ό 톡해 사전 ν—ˆκ°€λ₯Ό λ°›μ•„μ•Ό ν•œλ‹€.
1. 홍보λ₯Ό λͺ©μ μœΌλ‘œ ν•˜λŠ” κ²Œμ‹œκΈ€μΌ 경우, λ””μŠ€μ½”λ“œ λŒ€λ‚˜λ¬΄ 숲 μ„œλ²„λ₯Ό
톡해 κ΄€λ¦¬μžμ—κ²Œ 문의λ₯Ό 톡해 사전 ν—ˆκ°€λ₯Ό λ°›μ•„μ•Ό ν•œλ‹€.
</h4>
<h4 className={s.bold}>
2. 섀문쑰사λ₯Ό λͺ©μ μœΌλ‘œ ν•˜λŠ” κ²Œμ‹œκΈ€μΌ 경우, λ””μŠ€μ½”λ“œ λŒ€λ‚˜λ¬΄ 숲 μ„œλ²„λ₯Ό
톡해 κ΄€λ¦¬μžμ—κ²Œ 문의λ₯Ό 톡해 사전 ν—ˆκ°€λ₯Ό λ°›μ•„μ•Ό ν•œλ‹€.
</h4>
</p>
</article>
<h3 className={s.title}>
제 3μ‘° νŠΉμ • 이슈둜 μΈν•œ 과열에 κ΄€ν•œ κ·œμΉ™ 제 1ν•­:
</h3>
Expand Down
2 changes: 1 addition & 1 deletion src/components/index/item/sidebarContainer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const useGetCount = () => {
const [count, setCount] = useState<any>();
useEffect(() => {
RequestApi({
url: "https://ket73grkcf.execute-api.ap-northeast-2.amazonaws.com/apiV2/post/count",
url: process.env.NEXT_PUBLIC_APP_BASE_URLV2 + "/post/count",
}).then((res: any) => setCount(res.data));
}, []);
return count;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const AlgorithmModal: React.FC<algorithmModalProps> = (
};

const setStatusPost = (status: string) => {
Post.setStatusPost(p.algorithmId, status).then((res: any) => {
Post.setStatusPost(p.algorithmId, status, content).then((res: any) => {
res.status === 200
? alert("μ„±κ³΅μ μœΌλ‘œ μƒνƒœκ°€ λ³€κ²½λ˜μ—ˆμŠ΅λ‹ˆλ‹€.")
: alert("μ‹€νŒ¨ν•˜μ˜€μŠ΅λ‹ˆλ‹€.");
Expand Down
1 change: 1 addition & 0 deletions src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export interface algorithm extends defaultAlgorithm {
id: string;
number: number;
status: string;
reason?: string;
}

// create algorithm
Expand Down
3 changes: 2 additions & 1 deletion src/utils/api/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ class Post {
}
}

setStatusPost(id: string, status = "ACCEPTED") {
setStatusPost(id: string, status = "ACCEPTED", reason: string) {
try {
const data = {
status,
reason,
};
return RequestApiV2({
method: "POST",
Expand Down

0 comments on commit 2510245

Please sign in to comment.