Skip to content

Commit

Permalink
bug : build error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
YangJJune committed Aug 19, 2024
1 parent f081105 commit 7a0797c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/apis/Pay/PayPageAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const payHomeApi = async (
`${import.meta.env.VITE_API_BACK_URL}/space/${spaceID}/pay`,
requestOptions,
).then((res) =>
res?.json?.().then((data) => {
res?.json?.().then((data: any) => {
setReqData(data.result.payRequestInfoDtoList);
setRecData(data.result.payReceiveInfoDtoList);
}),
Expand Down
2 changes: 1 addition & 1 deletion src/pages/PayPage/CreatePayComponents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState } from "react";

import * as s from "@/pages/PayPage/PayPage.styled";
import { ChatUserInfoInSpace } from "./CreateRequestPage";
import { UserInfoInSpace } from "@/apis/SpaceSearchAllUserApi";
import { UserInfoInSpace } from "@/apis/Space/SpaceSearchAllUserApi";
interface payChatDivtype {
img: string;
name: string;
Expand Down
9 changes: 7 additions & 2 deletions src/pages/PayPage/CreateRequestPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,10 @@ const CreateRequestPage3 = ({
<span className="name">{value.userName}</span>
</section>
<s.RowFlexDiv>
<s.NormalTextDiv> {Number.parseInt(nPrice / tempArr.length)}</s.NormalTextDiv>
<s.NormalTextDiv>
{" "}
{nPrice !== undefined ? nPrice / tempArr.length : "NaN"}
</s.NormalTextDiv>
<s.TextDiv>์›</s.TextDiv>
</s.RowFlexDiv>
</Member>
Expand Down Expand Up @@ -422,7 +425,9 @@ const CreateRequestPage3 = ({
onClick={() => {
if (tabIndex === 0) {
nPriceHandler();
setTotalPrice(nPrice);
if (nPrice !== undefined) {
setTotalPrice(nPrice);
}
} else {
setTotalPrice(_totalPrice);
}
Expand Down

0 comments on commit 7a0797c

Please sign in to comment.