Skip to content

Commit

Permalink
fix: 반복문의 key 값 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
pp449 committed Jul 19, 2024
1 parent 1ab9c5e commit 4d5879b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions frontend/src/apis/my.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import apiClient from "./apiClient";
import { API_ENDPOINTS } from "./endpoints";

export const getMyReviewers = async (): Promise<ReviewerInfo[]> => {
const res = await apiClient<any>({
const res = await apiClient<ReviewerInfo[]>({
method: "get",
url: API_ENDPOINTS.REVIEWER,
});
Expand All @@ -12,7 +12,7 @@ export const getMyReviewers = async (): Promise<ReviewerInfo[]> => {
};

export const getMyReviewees = async (): Promise<ReviewerInfo[]> => {
const res = await apiClient<any>({
const res = await apiClient<ReviewerInfo[]>({
method: "get",
url: API_ENDPOINTS.REVIEWEE,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ const RoomInfoCard = () => {
<S.RoomContentBox>
<S.RoomTagBox>
{roomInfo.keywords.map((keyword, index) => (
<S.RoomKeyword>
<S.RoomContentSmall key={index}>#{keyword}</S.RoomContentSmall>
<S.RoomKeyword key={keyword}>
<S.RoomContentSmall>#{keyword}</S.RoomContentSmall>
</S.RoomKeyword>
))}
</S.RoomTagBox>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/shared/roomList/RoomList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const RoomList = ({ roomList }: { roomList: RoomInfo[] }) => {
return (
<S.RoomListContainer>
{roomList.map((roomInfo) => (
<Link to={`/room/1`}>
<Link to={`/room/1`} key={roomInfo.id}>
<RoomCard key={roomInfo.id} roomInfo={roomInfo} />
</Link>
))}
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const enableMocking = async () => {
};

enableMocking().then(() => {
ReactDOM.createRoot(document.getElementById("root")!).render(
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
<React.StrictMode>
<ThemeProvider theme={theme}>
<GlobalStyles />
Expand Down

0 comments on commit 4d5879b

Please sign in to comment.