section sources by lang

This commit is contained in:
Aria Moradi
2021-03-09 16:44:09 +03:30
parent 6f2f228e08
commit c842c51fb6
14 changed files with 163 additions and 50 deletions

View File

@@ -40,8 +40,9 @@ const getItemStyle = (isDragging, draggableStyle, palette) => ({
});
export default function Categories() {
const { setTitle } = useContext(NavbarContext);
setTitle('Categories');
const { setTitle, setAction } = useContext(NavbarContext);
useEffect(() => { setTitle('Categories'); setAction(<></>); }, []);
const [categories, setCategories] = useState([]);
const [categoryToEdit, setCategoryToEdit] = useState(-1); // -1 means new category
const [dialogOpen, setDialogOpen] = useState(false);