Skip to content

Commit

Permalink
Merge pull request #418 from sharemindteam/dev
Browse files Browse the repository at this point in the history
1106 배포
  • Loading branch information
rmdnps10 authored Nov 6, 2024
2 parents 7a1ed8e + 9515124 commit d48bf54
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 135 deletions.
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"react-cookie": "^7.0.1",
"react-device-detect": "^2.2.3",
"react-dom": "^18.2.0",
"react-microsoft-clarity": "^1.2.0",
"react-router-dom": "^6.21.1",
"react-scripts": "5.0.1",
"react-textarea-autosize": "^8.5.3",
Expand Down
16 changes: 0 additions & 16 deletions public/index.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,6 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Clarity tag -->
<script type="text/javascript">
(function (c, l, a, r, i, t, y) {
c[a] =
c[a] ||
function () {
(c[a].q = c[a].q || []).push(arguments);
};
t = l.createElement(r);
t.async = 1;
t.src = 'https://www.clarity.ms/tag/' + i;
y = l.getElementsByTagName(r)[0];
y.parentNode.insertBefore(t, y);
})(window, document, 'clarity', 'script', 'n11jaqdy8d');
</script>

<!-- Google tag (gtag.js) -->
<script
async
Expand Down
4 changes: 2 additions & 2 deletions src/Router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { BuyerMypage } from 'pages/Buyer/BuyerMypage';
import { BuyerSearch } from 'pages/Buyer/BuyerSearch';
import { BuyerSearchResult } from 'pages/Buyer/BuyerSearchResult';
import { BuyerSignup } from 'pages/Buyer/BuyerSignup';
import { SellerCaculateManagement } from 'pages/Seller/SellerCalculateManagement';
import { SellerConsult } from 'pages/Seller/SellerConsult';
import { SellerHome } from 'pages/Seller/SellerHome';
import { SellerLetter } from 'pages/Seller/SellerLetter';
Expand Down Expand Up @@ -56,6 +55,7 @@ import SellerProfitBankAccount from 'pages/Seller/SellerProfitBankAccount';
import ServerDown from 'pages/Common/ServerDown';
import SellerUpdateFail from 'pages/Seller/SellerUpdateFail';
import { BuyerManyLovedCounselor } from 'pages/Buyer/BuyerManyLovedCounselor';
import SellerCalculateManagement from 'pages/Seller/SellerCalculateManagement';

const Router = () => {
return (
Expand Down Expand Up @@ -164,7 +164,7 @@ const Router = () => {
{/* 판매자 : 수익 관리 */}
<Route
path="/minder/calculatemanagement"
element={<SellerCaculateManagement />}
element={<SellerCalculateManagement />}
/>
{/* 판매자 : 마인더 인증 */}
<Route path="/minder/education/*" element={<SellerVerifyMaterial />} />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Button } from 'components/Common/Button';
import { Space } from 'components/Common/Space';
import { ManageList } from 'pages/Seller/SellerCalculateManagement';
import React from 'react';
import styled from 'styled-components';
import { Grey4 } from 'styles/color';
Expand All @@ -14,17 +15,22 @@ interface CompleteApplyPopupProps {
date: string;
consultType: string;
setIsCompleteApplyManage: React.Dispatch<React.SetStateAction<boolean>>;
setManagementList: React.Dispatch<React.SetStateAction<ManageList>>;

id: number;
}

//
//
//

function CompleteApplyPopup({
name = '김고민',
date = '2001.12.15',
consultType = '무슨',
name,
date,
consultType,
setIsCompleteApplyManage,
setManagementList,
id,
}: CompleteApplyPopupProps) {
return (
<CompleteApplyPopupBox>
Expand All @@ -39,6 +45,9 @@ function CompleteApplyPopup({
width="calc(100% - 3.2rem)"
onClick={() => {
setIsCompleteApplyManage(false);
setManagementList((prev: ManageList) =>
prev.filter((item) => item.paymentId !== id),
);
}}
/>
</CompleteApplyPopupBox>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Grey3, Grey6, Green, White } from 'styles/color';
import { Body1, Body3 } from 'styles/font';
import CompleteApplyPopup from './CompleteApplyPopup';
import { BackDrop } from 'components/Common/BackDrop';
import { ManageList } from 'pages/Seller/SellerCalculateManagement';

interface SellerCalulateCardProps {
customerName: string;
Expand All @@ -13,11 +14,14 @@ interface SellerCalulateCardProps {
salePrice: number;
commission: number;
paymentDate: string;
consultDate: string;
paymentAccount: string;
id: number;
calculateActivate: boolean;
isShowPopup: boolean;
setIsShowPopup: any;
manageStatus: string;
setManagementList: React.Dispatch<React.SetStateAction<ManageList>>;
}

export const SellerCalulateCard = ({
Expand All @@ -28,10 +32,13 @@ export const SellerCalulateCard = ({
commission,
paymentAccount,
paymentDate,
consultDate,
calculateActivate,
id,
isShowPopup,
setIsShowPopup,
manageStatus,
setManagementList,
}: SellerCalulateCardProps) => {
const applyManagement = async (id: number) => {
const res: any = await patchApplyPayments(id);
Expand Down Expand Up @@ -59,6 +66,8 @@ export const SellerCalulateCard = ({
consultType={consultType}
date={paymentDate}
setIsCompleteApplyManage={setIsShowPopup}
setManagementList={setManagementList}
id={id}
/>
)}
<SellerCalulateCardWrapper>
Expand All @@ -81,7 +90,13 @@ export const SellerCalulateCard = ({
<Body3>{commission.toLocaleString()}</Body3>
</ConsultEarnInfoItem>
<ConsultEarnInfoItem>
<Body3 color={Grey3}>지급일자</Body3>
<Body3 color={Grey3}>상담일자</Body3>
<Body3>{consultDate}</Body3>
</ConsultEarnInfoItem>
<ConsultEarnInfoItem>
<Body3 color={Grey3}>
{manageStatus === '완료' ? '지급일자' : '지급예정'}
</Body3>
<Body3>{paymentDate}</Body3>
</ConsultEarnInfoItem>
<ConsultEarnInfoItem>
Expand Down
6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { StompProvider } from 'contexts/StompContext';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import AppLayout from 'App.Layout';

import { clarity } from 'react-microsoft-clarity';

axios.defaults.withCredentials = true;

const root = ReactDOM.createRoot(
Expand All @@ -18,6 +20,10 @@ const root = ReactDOM.createRoot(

const queryClient = new QueryClient();

if (process.env.NODE_ENV === 'production') {
clarity.init(process.env.REACT_APP_CLARITY_ID as string);
}

root.render(
<BrowserRouter>
<RecoilRoot>
Expand Down
Loading

0 comments on commit d48bf54

Please sign in to comment.