Skip to content

Commit

Permalink
feat: open new tab when send to declaration (#1908)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturlg authored Dec 11, 2023
1 parent 5daaff4 commit 2be9c90
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { AlternativeTable, type AlternativeTableProps, IndicatorNote, RecapCard,
import { Skeleton } from "@design-system/utils/client/skeleton";
import { useDeclarationFormManager } from "@services/apiClient/useDeclarationFormManager";
import { times } from "lodash";
import { redirect, useRouter } from "next/navigation";
import { redirect } from "next/navigation";
import { type ZodError } from "zod";

import { Indicateur2ou3Note } from "../(indicateurs2ou3)/Indicateur2ou3Note";
Expand All @@ -48,7 +48,6 @@ const IndicatorPercentResult = ({ result }: { result: number }) => (
);

export const RecapSimu = () => {
const router = useRouter();
const funnel = useSimuFunnelStore(store => store.funnel);
const hydrated = useSimuFunnelStoreHasHydrated();
const saveFormData = useDeclarationFormManager(state => state.saveFormData);
Expand Down Expand Up @@ -101,7 +100,7 @@ export const RecapSimu = () => {
// actions
const sendToDeclaration = () => {
saveFormData(simuFunnelToDeclarationDTO(funnel));
router.push("/index-egapro/declaration/commencer");
window.open("/index-egapro/declaration/commencer", "_blank");
};

return (
Expand Down

0 comments on commit 2be9c90

Please sign in to comment.