-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from dnd-side-project/feat/top-review-3
실시간 핫한 후기 UI 구현 및 연동
- Loading branch information
Showing
19 changed files
with
248 additions
and
77 deletions.
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
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.