side bar left bug fix

This commit is contained in:
2025-08-26 16:49:16 +05:30
parent 243fd6452c
commit 441f1efb23
2 changed files with 8 additions and 4 deletions

View File

@@ -120,7 +120,12 @@ const Assets: React.FC = () => {
echo.error("failed to fetch assets");
setisLoading(false);
}
if (asset === "Decals") {
fetchCategoryDecals("Safety");
}
};
const fetchCategoryDecals = async (asset: any) => {
setisLoading(true);
// setSelectedCategory(asset);
@@ -226,9 +231,8 @@ const Assets: React.FC = () => {
{activeSubcategories.map((cat, index) => (
<div
key={index}
className={`catogory-asset-filter-wrapper ${
selectedSubCategory === cat.name ? "active" : ""
}`}
className={`catogory-asset-filter-wrapper ${selectedSubCategory === cat.name ? "active" : ""
}`}
onClick={() => {
fetchCategoryDecals(cat.name);
setSelectedSubCategory(cat.name);

View File

@@ -664,6 +664,6 @@ interface DecalStore {
// Create the Zustand store with types
export const useDecalStore = create<DecalStore>((set) => ({
selectedSubCategory: null,
selectedSubCategory: 'Safety',
setSelectedSubCategory: (subCategory: string | null) => set({ selectedSubCategory: subCategory }),
}));