hide Default category from data

This commit is contained in:
Aria Moradi
2021-08-21 03:54:37 +04:30
parent 7a4bc28669
commit 0c8fa06a51

View File

@@ -65,6 +65,7 @@ export default function Categories() {
if (!dialogOpen) {
client.get('/api/v1/category/')
.then((response) => response.data)
.then((data) => { if (data.length > 0 && data[0].name === 'Default') data.shift(); return data; })
.then((data) => setCategories(data));
}
}, [updateTriggerHolder]);