hide Default category from data
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user