mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: clearing library cache (#6621)
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
08563e7d7b
commit
a91e401554
7 changed files with 86 additions and 41 deletions
|
@ -15,6 +15,7 @@ import { duplicateElements } from "../element/newElement";
|
|||
import { LibraryMenuControlButtons } from "./LibraryMenuControlButtons";
|
||||
import { LibraryDropdownMenu } from "./LibraryMenuHeaderContent";
|
||||
import LibraryMenuSection from "./LibraryMenuSection";
|
||||
import { useLibraryCache } from "../hooks/useLibraryItemSvg";
|
||||
|
||||
import "./LibraryMenuItems.scss";
|
||||
|
||||
|
@ -38,6 +39,7 @@ export default function LibraryMenuItems({
|
|||
id: string;
|
||||
}) {
|
||||
const [selectedItems, setSelectedItems] = useState<LibraryItem["id"][]>([]);
|
||||
const { svgCache } = useLibraryCache();
|
||||
|
||||
const unpublishedItems = libraryItems.filter(
|
||||
(item) => item.status !== "published",
|
||||
|
@ -224,6 +226,7 @@ export default function LibraryMenuItems({
|
|||
onItemDrag={onItemDrag}
|
||||
onClick={onItemClick}
|
||||
isItemSelected={isItemSelected}
|
||||
svgCache={svgCache}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
|
@ -243,6 +246,7 @@ export default function LibraryMenuItems({
|
|||
onItemDrag={onItemDrag}
|
||||
onClick={onItemClick}
|
||||
isItemSelected={isItemSelected}
|
||||
svgCache={svgCache}
|
||||
/>
|
||||
) : unpublishedItems.length > 0 ? (
|
||||
<div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue