Skip to content

Commit 8f3a0be

Browse files
[WEB-3194]fix: stickies modal close while redirection (#6440)
* fix: stickies modal close while redirection * chore: added deafult for optional prop
1 parent 0679e14 commit 8f3a0be

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

web/core/components/stickies/layout/stickies-truncated.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,12 @@ import { useSticky } from "@/hooks/use-stickies";
1010
import { ContentOverflowWrapper } from "../../core/content-overflow-HOC";
1111
import { StickiesLayout } from "./stickies-list";
1212

13-
export const StickiesTruncated = observer(() => {
13+
type StickiesTruncatedProps = {
14+
handleClose?: () => void;
15+
};
16+
17+
export const StickiesTruncated = observer((props: StickiesTruncatedProps) => {
18+
const { handleClose = () => {} } = props;
1419
// navigation
1520
const { workspaceSlug } = useParams();
1621
// store hooks
@@ -33,6 +38,7 @@ export const StickiesTruncated = observer(() => {
3338
className={cn(
3439
"gap-1 w-full text-custom-primary-100 text-sm font-medium transition-opacity duration-300 bg-custom-background-90/20"
3540
)}
41+
onClick={handleClose}
3642
>
3743
Show all
3844
</Link>

web/core/components/stickies/modal/stickies.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export const Stickies = observer((props: TProps) => {
6767
</div>
6868
{/* content */}
6969
<div className="mb-4 max-h-[625px] overflow-scroll">
70-
<StickiesTruncated />
70+
<StickiesTruncated handleClose={handleClose} />
7171
</div>
7272
</div>
7373
);

0 commit comments

Comments
 (0)