Creating Skeleton in Image_Gallery. #415

Closed
kartik.sharma wants to merge 17 commits from Image_Gallery_filter into Organization_Management
Showing only changes of commit eaccf0fca2 - Show all commits

View File

@ -99,15 +99,23 @@ const ImageGalleryPage = () => {
const handleRemoveFilter = (filterKey, valueId) => { const handleRemoveFilter = (filterKey, valueId) => {
setAppliedFilters((prev) => { setAppliedFilters((prev) => {
const updated = { ...prev }; const updated = { ...prev };
if (Array.isArray(updated[filterKey])) { if (Array.isArray(updated[filterKey])) {
updated[filterKey] = updated[filterKey].filter((id) => id !== valueId); updated[filterKey] = updated[filterKey].filter((id) => id !== valueId);
} else if (filterKey === "startDate" || filterKey === "endDate") { }
else if (filterKey === "startDate" || filterKey === "endDate") {
updated[filterKey] = null; updated[filterKey] = null;
} }
else if (filterKey === "dateRange") {
updated.startDate = null;
updated.endDate = null;
}
return updated; return updated;
}); });
}; };
// --- Chips --- // --- Chips ---
const appliedFiltersChips = useMemo(() => { const appliedFiltersChips = useMemo(() => {
const chips = []; const chips = [];