web: fix force redirect to home on navigating to a color

This commit is contained in:
Abdullah Atta
2023-12-27 09:51:06 +05:00
parent 2ef0f41612
commit e3eb3c8000

View File

@@ -45,11 +45,7 @@ function Notes() {
);
useEffect(() => {
if (
context?.type === "color" &&
contextNotes &&
contextNotes.ids.length <= 0
) {
if (context?.type === "color" && contextNotes && contextNotes.length <= 0) {
navigate("/", { replace: true });
}
}, [context, contextNotes]);