-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ✨ 의존성 모듈 변경 반영 * ✨ 인기언어 쿼리 작성 * ✨ 인기 언어 API 연결 * 🗑️ MockData 삭제 * ✨ 리뷰어 랭킹 팀원 링크 연결 * ✨ 팀원 새창 열리게 수정 * 🐛 로딩상태 jsx로 수정 * 🐛 Github 링크 수정
- Loading branch information
1 parent
d01f391
commit c738796
Showing
9 changed files
with
288 additions
and
228 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,5 @@ | ||
import { ENV } from "~/shared/environment"; | ||
|
||
export const LANGUAGE_RANK_ENDPOINT = `${ENV.baseUrl}/api/category/popular`; | ||
|
||
export const LANGUAGE_RANK_KEY = ["language-rank"]; |
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,16 @@ | ||
import { UseQueryResult, useQuery } from "@tanstack/react-query"; | ||
|
||
import { LanguageRankType } from "../model/language-rank.type"; | ||
import { LANGUAGE_RANK_ENDPOINT, LANGUAGE_RANK_KEY } from "./language-rank.key"; | ||
|
||
export const useLanguageRankQuery = (): UseQueryResult<LanguageRankType[]> => { | ||
const languageRank = useQuery<LanguageRankType[]>({ | ||
queryKey: LANGUAGE_RANK_KEY, | ||
queryFn: async () => { | ||
const response = await fetch(LANGUAGE_RANK_ENDPOINT); | ||
const json = await response.json(); | ||
return json; | ||
}, | ||
}); | ||
return languageRank; | ||
}; |
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
export interface LanguageRankType { | ||
id: number; | ||
name: string; | ||
count: number; | ||
} |
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 |
---|---|---|
@@ -1,11 +1,10 @@ | ||
export const mockData = [ | ||
{ id: 0, username: "Xion" }, | ||
{ id: 1, username: "Xion" }, | ||
{ id: 2, username: "Xion" }, | ||
{ id: 3, username: "Xion" }, | ||
{ id: 4, username: "Xion" }, | ||
{ id: 5, username: "Xion" }, | ||
{ id: 6, username: "Xion" }, | ||
{ id: 7, username: "Xion" }, | ||
{ id: 8, username: "Xion" }, | ||
{ id: 0, username: "하늘", url: "https://github.com/Leedo02" }, | ||
{ id: 1, username: "로키", url: "https://github.com/rookedsysc" }, | ||
{ id: 2, username: "르미", url: "/ruemi" }, | ||
{ id: 3, username: "미오", url: "https://github.com/Jaeeun98" }, | ||
{ id: 4, username: "삽사리", url: "https://github.com/Sang-minKIM" }, | ||
{ id: 5, username: "시온", url: "https://github.com/XionWCFM" }, | ||
{ id: 6, username: "운터", url: "https://github.com/anveloper" }, | ||
{ id: 7, username: "준", url: "https://github.com/Yongveloper" }, | ||
]; |
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