Skip to content

Commit

Permalink
Merge pull request #94 from KUIT-Space/bug#93-build-error
Browse files Browse the repository at this point in the history
Bug#93 build error
  • Loading branch information
Turtle-Hwan authored Aug 19, 2024
2 parents 764f704 + 7a0797c commit d87f064
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/apis/Pay/PayPageAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from "@/apis/_createRequestOptions";
import { BankInfo, ChatUserInfoInSpace } from "@/pages/PayPage/CreateRequestPage";
import { useNavigate } from "react-router-dom";
import { UserInfoInSpace } from "../SpaceSearchAllUserApi";
import { UserInfoInSpace } from "@/apis/Space/SpaceSearchAllUserApi";

interface SpaceSearchAllUserApiResponseType {
code: number;
Expand Down Expand Up @@ -100,12 +100,12 @@ export const payHomeApi = async (
const response = await fetchPayApi(
`${import.meta.env.VITE_API_BACK_URL}/space/${spaceID}/pay`,
requestOptions,
).then((res) =>
res?.json?.().then((data: any) => {
setReqData(data.result.payRequestInfoDtoList);
setRecData(data.result.payReceiveInfoDtoList);
}),
);

response.json().then((data) => {
setReqData(data.result.payRequestInfoDtoList);
setRecData(data.result.payReceiveInfoDtoList);
});
};

export const recentAccountApi = async (
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 d87f064

Please sign in to comment.