Skip to content

Commit

Permalink
fix: #2 #3 #5 일부 버그 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leestana01 committed Aug 16, 2024
1 parent 7e283ba commit 0df473b
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/event/eventInfo/EventInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,12 @@ export default function EventInfo(){

useEffect(() => {
const fetchData = async () => {
const now = new Date();
const kstNow = new Date(now.getTime() + 9 * 60 * 60 * 1000);
const formattedDateTime = kstNow.toISOString().split('.')[0];

Promise.all([
getBillList(eventId, "2000-01-01T00:00:00", "first", 20),
getBillList(eventId, formattedDateTime, "first", 20),
getEventInfo(eventId)
]).then(([billResponse, eventResponse]) => {
setBillData(billResponse);
Expand Down
12 changes: 6 additions & 6 deletions src/event/eventMain/EventMain.mock.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export const mockForClubAlert = [
{
id: 1,
type: "toast",
content: "[구현 안됨]\n현재 납부하지 않은 회비가 1건 있습니다. \n - MT 비용",
color: "#FF4E4E"
}
// {
// id: 1,
// type: "toast",
// content: "[구현 안됨]\n현재 납부하지 않은 회비가 1건 있습니다. \n - MT 비용",
// color: "#FF4E4E"
// }
]

export const mockForEventList = {
Expand Down
5 changes: 3 additions & 2 deletions src/event/eventTotal/EventTotal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ export default function EventTotal() {
useEffect(() => {
const fetchData = async () => {
const now = new Date();
const formattedDateTime = now.toISOString().split('.')[0];

const kstNow = new Date(now.getTime() + 9 * 60 * 60 * 1000);
const formattedDateTime = kstNow.toISOString().split('.')[0];

const response = await getAllBillList(params.clubId, formattedDateTime, "first", 20);
setTotalData(response);
}
Expand Down
2 changes: 1 addition & 1 deletion src/event/eventUnclassified/components/UnclassifiedLog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export default function UnclassifiedLog({e}) {
<ElementLog onClick={() => setShowModal(true)}>
<ElementLeft>
{
e.amount >= 0 ? (
e.status === "FEE" ? (
<CircleForType $color={colorSet.deposit}></CircleForType>
) : (
<CircleForType $color={colorSet.withdraw}></CircleForType>
Expand Down
2 changes: 1 addition & 1 deletion src/landingPage/styles/ServiceInfo.styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const EnterForm = styled.form`
`;

export const InputBox = styled.input`
width: 20rem;
width: 15rem;
height: 3rem;
padding: 0 1rem;
border: none;
Expand Down
3 changes: 2 additions & 1 deletion src/server/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export async function getEventInfo(eventId) {
export async function getEventsUnfinished(clubId){
try {
const now = new Date();
const formattedDateTime = now.toISOString().split('T')[0];
const kstNow = new Date(now.getTime() + 9 * 60 * 60 * 1000);
const formattedDateTime = kstNow.toISOString().split('T')[0];

const response = await axiosInstance.get(
`/api/v1/events/funding?clubId=${clubId}&now=${formattedDateTime}`);
Expand Down

0 comments on commit 0df473b

Please sign in to comment.