Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion web/core/components/stickies/layout/stickies-truncated.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handleClose is optional here so can you render it conditionally?

>
Show all
</Link>
Expand Down
2 changes: 1 addition & 1 deletion web/core/components/stickies/modal/stickies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export const Stickies = observer((props: TProps) => {
</div>
{/* content */}
<div className="mb-4 max-h-[625px] overflow-scroll">
<StickiesTruncated />
<StickiesTruncated handleClose={handleClose} />
</div>
</div>
);
Expand Down
Loading