diff --git a/webapp/CHANGELOG.md b/webapp/CHANGELOG.md
index f3a3d05a..fd5ad4b2 100644
--- a/webapp/CHANGELOG.md
+++ b/webapp/CHANGELOG.md
@@ -1,10 +1,9 @@
## [0.73.20](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.73.19...v0.73.20) (2024-12-05)
-
### Bug Fixes
-* desactivate reminder auchan and offer user preferences notifications and group offer activated reminder by user instead by offer ([d52879d](https://github.com/SocialGouv/carte-jeune-engage/commit/d52879d1f07bcbbd4711457fac499ba02691e44e))
-* remove unused import ([fe1bb94](https://github.com/SocialGouv/carte-jeune-engage/commit/fe1bb94cc13ee929b93fd8270523e6cbd0403518))
+- desactivate reminder auchan and offer user preferences notifications and group offer activated reminder by user instead by offer ([d52879d](https://github.com/SocialGouv/carte-jeune-engage/commit/d52879d1f07bcbbd4711457fac499ba02691e44e))
+- remove unused import ([fe1bb94](https://github.com/SocialGouv/carte-jeune-engage/commit/fe1bb94cc13ee929b93fd8270523e6cbd0403518))
## [0.73.19](https://github.com/SocialGouv/carte-jeune-engage/compare/v0.73.18...v0.73.19) (2024-12-04)
diff --git a/webapp/src/components/modals/IssueModal.tsx b/webapp/src/components/modals/IssueModal.tsx
index ed4e5ea7..4e5d27d2 100644
--- a/webapp/src/components/modals/IssueModal.tsx
+++ b/webapp/src/components/modals/IssueModal.tsx
@@ -13,10 +13,8 @@ import {
Button,
Center,
} from "@chakra-ui/react";
-import dynamic from "next/dynamic";
import { useState } from "react";
import {
- HiMiniChatBubbleOvalLeftEllipsis,
HiEnvelope,
HiPhone,
HiChevronRight,
@@ -24,12 +22,9 @@ import {
HiCheckCircle,
} from "react-icons/hi2";
import { IconType } from "react-icons/lib";
-import { useAuth } from "~/providers/Auth";
import { api } from "~/utils/api";
import ConditionalLink from "../ConditionalLink";
-const CRISP_TOKEN = process.env.NEXT_PUBLIC_CRISP_TOKEN as string;
-
const defaultIssueCases = [
"Le prix avec la réduction ne correspond pas",
"Autre chose",
@@ -178,10 +173,6 @@ type IssueModalProps = IssueModalOrder | IssueModalCoupon;
const IssueModal = (props: IssueModalProps) => {
const { isOpen, onClose, kind } = props;
- const { user } = useAuth();
- const CrispWithNoSSR = dynamic(() => import("../support/Crisp"));
-
- const [isOpenCrisp, setIsOpenCrisp] = useState(false);
const id = kind === "order" ? props.order_id : props.coupon_id;
@@ -203,74 +194,53 @@ const IssueModal = (props: IssueModalProps) => {
];
return (
- <>
-
-
- {!isOpenCrisp && (
-
-
-
-
-
-
- setIsOpenCrisp(true)}
- icon={HiMiniChatBubbleOvalLeftEllipsis}
- text="Discutez avec nous en direct"
- />
- {kind === "order" && (
- <>
-
- ou
-
-
-
-
-
- Disponible du lundi au vendredi de
-
- 09h à 12h30 puis de 14h à 17h30
-
-
- >
- )}
-
-
-
- )}
-
- {isOpenCrisp && user && (
- {
- setIsOpenCrisp(false);
- }}
- />
- )}
- >
+
+
+
+
+
+
+
+
+ {/* setIsOpenCrisp(true)}
+ icon={HiMiniChatBubbleOvalLeftEllipsis}
+ text="Discutez avec nous en direct"
+ />
+
+ ou
+ */}
+
+
+
+
+ Disponible du lundi au vendredi de
+
+ 09h à 12h30 puis de 14h à 17h30
+
+
+
+
+
+
);
};
diff --git a/webapp/src/components/modals/ObizOrderProcessModal.tsx b/webapp/src/components/modals/ObizOrderProcessModal.tsx
index d9799da6..68ed4756 100644
--- a/webapp/src/components/modals/ObizOrderProcessModal.tsx
+++ b/webapp/src/components/modals/ObizOrderProcessModal.tsx
@@ -17,14 +17,10 @@ import { OfferIncluded } from "~/server/api/routers/offer";
import { OfferArticle } from "~/server/types";
import { api } from "~/utils/api";
import LayoutOrderStatus from "../obiz/LayoutOrderStatus";
-import { HiMiniShieldCheck, HiQuestionMarkCircle } from "react-icons/hi2";
+import { HiMiniShieldCheck } from "react-icons/hi2";
import { formatter2Digits } from "~/utils/tools";
import { useRouter } from "next/router";
import PartnerImage from "../ui/PartnerImage";
-import dynamic from "next/dynamic";
-import { useAuth } from "~/providers/Auth";
-
-const CRISP_TOKEN = process.env.NEXT_PUBLIC_CRISP_TOKEN as string;
const ObizOfferVariableContent = ({
step,
@@ -223,11 +219,7 @@ export default function ObizOrderProcessModal(
) {
const { isOpen, onClose, onRedirectPayment, offerId } = props;
const router = useRouter();
- const { user } = useAuth();
-
- const CrispWithNoSSR = dynamic(() => import("../support/Crisp"));
- const [isOpenCrisp, setIsOpenCrisp] = useState(false);
const [amount, setAmount] = useState(0);
const [step, setStep] = useState("amount");
const [selectedArticles, setSelectedArticles] = useState<
@@ -265,90 +257,75 @@ export default function ObizOrderProcessModal(
<>
- {!isOpenCrisp && (
-
-
- {step !== "payment" && (
-
-
-
- step == "amount" ? onClose() : setStep("amount")
- }
- />
-
-
-
-
- {offer.partner.name}
-
-
- {offer.title} {offer.subtitle ?? ""}
-
-
- setIsOpenCrisp(true)}
+
+
+ {step !== "payment" && (
+
+
+
+ step == "amount" ? onClose() : setStep("amount")
+ }
/>
+
+
+
+
+ {offer.partner.name}
+
+
+ {offer.title} {offer.subtitle ?? ""}
+
- )}
- {
- if (
- availableArticles.length === 1 &&
- availableArticles[0].kind === "variable_price"
- ) {
- createTestOrder({
- offer_id: offer.id,
- article_references: [
- {
- reference: availableArticles[0].reference,
- quantity: 1,
- },
- ],
- input_value: amount - (amount * discount) / 100,
- input_value_public: amount,
- });
- } else {
- createTestOrder({
- offer_id: offer.id,
- article_references: selectedArticles.map((article) => ({
- reference: article.article.reference,
- quantity: article.quantity,
- })),
- });
- }
- }}
- selectedArticles={selectedArticles}
- setSelectedArticles={setSelectedArticles}
- />
-
-
- )}
+ {/* setIsOpenCrisp(true)}
+ /> */}
+
+ )}
+ {
+ if (
+ availableArticles.length === 1 &&
+ availableArticles[0].kind === "variable_price"
+ ) {
+ createTestOrder({
+ offer_id: offer.id,
+ article_references: [
+ {
+ reference: availableArticles[0].reference,
+ quantity: 1,
+ },
+ ],
+ input_value: amount - (amount * discount) / 100,
+ input_value_public: amount,
+ });
+ } else {
+ createTestOrder({
+ offer_id: offer.id,
+ article_references: selectedArticles.map((article) => ({
+ reference: article.article.reference,
+ quantity: article.quantity,
+ })),
+ });
+ }
+ }}
+ selectedArticles={selectedArticles}
+ setSelectedArticles={setSelectedArticles}
+ />
+
+
- {isOpenCrisp && user && (
- {
- setIsOpenCrisp(false);
- }}
- />
- )}
>
);
}
diff --git a/webapp/src/components/wrappers/WalletWrapper.tsx b/webapp/src/components/wrappers/WalletWrapper.tsx
index e0ee336c..83aec68d 100644
--- a/webapp/src/components/wrappers/WalletWrapper.tsx
+++ b/webapp/src/components/wrappers/WalletWrapper.tsx
@@ -1,23 +1,13 @@
import { Box, Button, Flex, Heading, Icon, Link } from "@chakra-ui/react";
-import { ReactNode, useState } from "react";
-import { HiCog6Tooth, HiQuestionMarkCircle, HiUser } from "react-icons/hi2";
+import { ReactNode } from "react";
+import { HiCog6Tooth, HiUser } from "react-icons/hi2";
import NextLink from "next/link";
-import dynamic from "next/dynamic";
-import { useAuth } from "~/providers/Auth";
-
-const CRISP_TOKEN = process.env.NEXT_PUBLIC_CRISP_TOKEN as string;
type WalletWrapperProps = {
children: ReactNode;
};
const WalletWrapper = ({ children }: WalletWrapperProps) => {
- const { user } = useAuth();
-
- const [isOpenCrisp, setIsOpenCrisp] = useState(false);
-
- const CrispWithNoSSR = dynamic(() => import("../support/Crisp"));
-
return (
@@ -47,13 +37,13 @@ const WalletWrapper = ({ children }: WalletWrapperProps) => {
size="xs"
/>
- setIsOpenCrisp(true)}
- />
+ /> */}
{
{children}
- {isOpenCrisp && user && (
- {
- setIsOpenCrisp(false);
- }}
- />
- )}
);
};
diff --git a/webapp/src/pages/dashboard/account/index.tsx b/webapp/src/pages/dashboard/account/index.tsx
index 321f6ddd..e5f159d9 100644
--- a/webapp/src/pages/dashboard/account/index.tsx
+++ b/webapp/src/pages/dashboard/account/index.tsx
@@ -1,18 +1,8 @@
import { Box, Flex, Icon, IconButton, Link, Text } from "@chakra-ui/react";
import { useRouter } from "next/router";
import PassCard from "~/components/account/PassCard";
-import {
- HiCog6Tooth,
- HiQuestionMarkCircle,
- HiUser,
- HiXMark,
-} from "react-icons/hi2";
+import { HiCog6Tooth, HiUser, HiXMark } from "react-icons/hi2";
import NextLink from "next/link";
-import dynamic from "next/dynamic";
-import { useState } from "react";
-import { useAuth } from "~/providers/Auth";
-
-const CRISP_TOKEN = process.env.NEXT_PUBLIC_CRISP_TOKEN as string;
const HeaderButton = ({
icon,
@@ -53,13 +43,6 @@ const HeaderButton = ({
export default function AccountCard() {
const router = useRouter();
- const { user } = useAuth();
-
- const [isOpenCrisp, setIsOpenCrisp] = useState(false);
-
- const CrispWithNoSSR = dynamic(
- () => import("../../../components/support/Crisp")
- );
return (
@@ -84,18 +67,13 @@ export default function AccountCard() {
link="/dashboard/account/settings"
/>
{/* */}
- {
setIsOpenCrisp(true);
}}
- />
+ /> */}
@@ -119,15 +97,6 @@ export default function AccountCard() {
Retour à mes réductions
- {isOpenCrisp && user && (
- {
- setIsOpenCrisp(false);
- }}
- />
- )}
);
}
diff --git a/webapp/src/pages/dashboard/index.tsx b/webapp/src/pages/dashboard/index.tsx
index a411a50f..1430ba9f 100644
--- a/webapp/src/pages/dashboard/index.tsx
+++ b/webapp/src/pages/dashboard/index.tsx
@@ -10,7 +10,7 @@ import {
import dynamic from "next/dynamic";
import NextLink from "next/link";
import { useState } from "react";
-import { HiMiniTag, HiQuestionMarkCircle } from "react-icons/hi2";
+import { HiMiniTag } from "react-icons/hi2";
import InstallationBanner from "~/components/InstallationBanner";
import LoadingLoader from "~/components/LoadingLoader";
import SearchBar from "~/components/SearchBar";
@@ -21,8 +21,6 @@ import TagsList from "~/components/lists/TagsList";
import { useAuth } from "~/providers/Auth";
import { api } from "~/utils/api";
-const CRISP_TOKEN = process.env.NEXT_PUBLIC_CRISP_TOKEN as string;
-
export default function Dashboard() {
const { user } = useAuth();
@@ -76,7 +74,7 @@ export default function Dashboard() {
Explorer
-
-
+ */}
- {isOpenCrisp && user && (
- {
- setIsOpenCrisp(false);
- }}
- />
- )}
);
}