-
Notifications
You must be signed in to change notification settings - Fork 1
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
실시간 핫한 후기 UI 구현 및 연동 #41
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2e4a1dd
🔧 chore: 실시간 핫한 후기 엔드포인트 추가 #31
froggy1014 c55d19e
🔧 chore: 클라이언트 사이드 세션 함수 리네이밍
froggy1014 fb23cae
✅ test: 실시간 핫한 후기 목 데이터 생성 #31
froggy1014 e471ea5
👷 cicd: 지형님 어사인 추가 하핳
froggy1014 2dd7d88
✨ feat: 실시간 핫한 후기 API, Type 선언 #31
froggy1014 ca79b6d
💅 style: 새로운 타입에 맞춰 리뷰 컴포넌트 수정 #31
froggy1014 0a370b5
🔧 chore: 마이너한 수정사항 반영
froggy1014 b080b73
💅 style: 실시간 핫한 후기 퍼블리싱 작업 완료 #31
froggy1014 10f51b8
👷 cicd: 필요 환경변수 시크릿에 추가 #31
froggy1014 93368be
👷 cicd: set up environment varilable 시크릿 추가
froggy1014 dc63feb
👷 cicd: 환경변수 셋업 yml 생성 #31
froggy1014 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ addAssignees: author | |
|
||
reviewers: | ||
- punchdrunkard | ||
# - Zero-1016 | ||
- Zero-1016 | ||
# - seokzin | ||
# - saseungmin | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Set Environment Variables | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
NEXT_PUBLIC_STAGE: | ||
required: true | ||
type: string | ||
NEXT_PUBLIC_BASE_URL: | ||
required: true | ||
type: string | ||
AUTH_SECRET: | ||
required: true | ||
type: string | ||
AUTH_KAKAO_ID: | ||
required: true | ||
type: string | ||
AUTH_KAKAO_SECRET: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
set-env-vars: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up environment variables | ||
run: | | ||
echo "NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL" >> .env | ||
echo "NEXT_PUBLIC_STAGE=$NEXT_PUBLIC_STAGE" >> .env | ||
echo "AUTH_SECRET=$AUTH_SECRET" >> .env | ||
echo "AUTH_KAKAO_ID=$AUTH_KAKAO_ID" >> .env | ||
echo "AUTH_KAKAO_SECRET=$AUTH_KAKAO_SECRET" >> .env | ||
env: | ||
NEXT_PUBLIC_BASE_URL: ${{ inputs.NEXT_PUBLIC_BASE_URL }} | ||
NEXT_PUBLIC_STAGE: ${{ inputs.NEXT_PUBLIC_STAGE }} | ||
AUTH_SECRET: ${{ inputs.AUTH_SECRET }} | ||
AUTH_KAKAO_ID: ${{ inputs.AUTH_KAKAO_ID }} | ||
AUTH_KAKAO_SECRET: ${{ inputs.AUTH_KAKAO_SECRET }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"use server"; | ||
|
||
import instance from "@/apis/instance"; | ||
import { FIESTA_ENDPOINTS } from "@/config"; | ||
|
||
import { TopReview } from "./topReviewsType"; | ||
|
||
const ENDPOINT = FIESTA_ENDPOINTS.reviews; | ||
|
||
export async function getTopReviews() { | ||
const endpoint = ENDPOINT.mostlike; | ||
const { data } = await instance.get<Array<TopReview>>(endpoint, { | ||
cache: "no-store", | ||
}); | ||
|
||
return data; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export interface TopReview { | ||
reviewId: number; | ||
festivalId: number; | ||
festivalName: string; | ||
content: string; | ||
rating: number; | ||
images?: { | ||
imageId: number; | ||
imageUrl: string; | ||
}; | ||
keywords: { | ||
keywordId: number; | ||
keyword: string; | ||
}[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { getTopReviews } from "@/apis/review/topReviews/topReviews"; | ||
import { ReviewTile } from "@/components/core/List"; | ||
|
||
const TopReviews = async () => { | ||
const topReviews = await getTopReviews(); | ||
return ( | ||
<section className="flex w-full flex-col gap-[12px]"> | ||
<div className="flex w-full justify-between"> | ||
<div className="flex gap-[4px] text-title-bold text-gray-scale-900"> | ||
실시간 핫한 후기 | ||
</div> | ||
</div> | ||
|
||
<div className="flex w-full flex-col gap-[12px]"> | ||
{topReviews.map((review) => ( | ||
<ReviewTile key={review.reviewId} review={review} /> | ||
))} | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default TopReviews; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { default as FestivalHot } from "./FestivalHot"; | ||
export { default as FestivalThisWeek } from "./FestivalThisWeek"; | ||
export { default as TopReviews } from "./TopReviews"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,32 +19,54 @@ export const Default: Story = { | |
</div> | ||
), | ||
args: { | ||
festivalReview: { | ||
src: "/images/festivalReview.png", | ||
title: "서울 치맥 페스티벌", | ||
content: | ||
"완전 더워요... 선크림 필수.. 빨간 트럭에서파는 치킨 추천합니당 바삭하고 맛있어요. 바삭하고 맛있어요. 바삭하고 맛있어요.", | ||
duration: "8월 1일 ~ 8월 4일", | ||
review: { | ||
reviewId: 6532, | ||
festivalId: 123, | ||
festivalName: "2024 팔레트 뮤직 페스티벌", | ||
content: "음악 듣기 정말 좋은 페스티벌인 것 같아요. 진짜 힐링 그 자체~", | ||
rating: 4, | ||
keywords: ["✨쾌적해요", "✨쾌적해요"], | ||
images: { | ||
imageId: 145156, | ||
imageUrl: "/images/festivalReview.png", | ||
}, | ||
Comment on lines
+28
to
+31
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. 여기 응답 변경있습니다............. 죄송해요 (images 만 thumbnailImage로 string 하나 내려와요) https://breakyourlimit.notion.site/1159d5ddd66a4aa7a8dc615106f70341?pvs=4 명세 참고해주시고, 그리고 후기 이미지 없는 경우가 있어서 없으면 해당 필드 생략되서 내려올거에요. |
||
keywords: [ | ||
{ | ||
keywordId: 12, | ||
keyword: "✨쾌적해요", | ||
}, | ||
{ | ||
keywordId: 12, | ||
keyword: "✨쾌적해요", | ||
}, | ||
], | ||
}, | ||
}, | ||
}; | ||
|
||
export const WithOutPhoto: Story = { | ||
export const NoPhoto: Story = { | ||
render: (args) => ( | ||
<div className="w-[360px]"> | ||
<ReviewTile {...args} /> | ||
</div> | ||
), | ||
args: { | ||
festivalReview: { | ||
title: "서울 치맥 페스티벌", | ||
review: { | ||
reviewId: 6532, | ||
festivalId: 123, | ||
festivalName: "2024 팔레트 뮤직 페스티벌", | ||
content: | ||
"완전 더워요... 선크림 필수.. 빨간 트럭에서파는 치킨 추천합니당 바삭하고 맛있어요. 바삭하고 맛있어요. 바삭하고 맛있어요.", | ||
duration: "8월 1일 ~ 8월 4일", | ||
"완전 더워요... 그냥 더워 죽어요... ㅜㅜ 시원하게 입고가세요... 물이랑 손풍기 필수", | ||
rating: 4, | ||
keywords: ["✨쾌적해요", "✨쾌적해요"], | ||
keywords: [ | ||
{ | ||
keywordId: 12, | ||
keyword: "✨쾌적해요", | ||
}, | ||
{ | ||
keywordId: 12, | ||
keyword: "✨쾌적해요", | ||
}, | ||
], | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
P5
해당 함수를 따로 분리를 했어야하나? 라는 의문이 있습니다.
로 분리해도 될 것 같기도 하고 그대로 넣어도 상관 없을 것 같습니다!
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.
반영토록 하겠습니다.