From 3c5270ae0244d93b79c805797ebd7aedd2226e60 Mon Sep 17 00:00:00 2001 From: Vamsi krishna Date: Tue, 21 Jan 2025 21:10:26 +0530 Subject: [PATCH 1/2] fix: stickies modal close while redirection --- .../components/stickies/layout/stickies-truncated.tsx | 8 +++++++- web/core/components/stickies/modal/stickies.tsx | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/web/core/components/stickies/layout/stickies-truncated.tsx b/web/core/components/stickies/layout/stickies-truncated.tsx index f538917b534..207e33005e5 100644 --- a/web/core/components/stickies/layout/stickies-truncated.tsx +++ b/web/core/components/stickies/layout/stickies-truncated.tsx @@ -10,7 +10,12 @@ import { useSticky } from "@/hooks/use-stickies"; import { ContentOverflowWrapper } from "../../core/content-overflow-HOC"; import { StickiesLayout } from "./stickies-list"; -export const StickiesTruncated = observer(() => { +type StickiesTruncatedProps = { + handleClose?: () => void; +}; + +export const StickiesTruncated = observer((props: StickiesTruncatedProps) => { + const { handleClose } = props; // navigation const { workspaceSlug } = useParams(); // store hooks @@ -33,6 +38,7 @@ export const StickiesTruncated = observer(() => { className={cn( "gap-1 w-full text-custom-primary-100 text-sm font-medium transition-opacity duration-300 bg-custom-background-90/20" )} + onClick={handleClose} > Show all diff --git a/web/core/components/stickies/modal/stickies.tsx b/web/core/components/stickies/modal/stickies.tsx index 832073ddc13..1cc16bfc6d8 100644 --- a/web/core/components/stickies/modal/stickies.tsx +++ b/web/core/components/stickies/modal/stickies.tsx @@ -67,7 +67,7 @@ export const Stickies = observer((props: TProps) => { {/* content */}
- +
); From aa39ff27b962a3de25ba102f55cb3a9700f21cec Mon Sep 17 00:00:00 2001 From: Vamsi krishna Date: Wed, 22 Jan 2025 13:54:53 +0530 Subject: [PATCH 2/2] chore: added deafult for optional prop --- web/core/components/stickies/layout/stickies-truncated.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/core/components/stickies/layout/stickies-truncated.tsx b/web/core/components/stickies/layout/stickies-truncated.tsx index 207e33005e5..c7af1191b8f 100644 --- a/web/core/components/stickies/layout/stickies-truncated.tsx +++ b/web/core/components/stickies/layout/stickies-truncated.tsx @@ -15,7 +15,7 @@ type StickiesTruncatedProps = { }; export const StickiesTruncated = observer((props: StickiesTruncatedProps) => { - const { handleClose } = props; + const { handleClose = () => {} } = props; // navigation const { workspaceSlug } = useParams(); // store hooks