idk
This commit is contained in:
@@ -4,12 +4,6 @@ import { Link } from 'wouter';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
const Tab = ({ title, href, icon, selected, selectedIcon, onClick }) => {
|
||||
console.log('TAB', href, selected);
|
||||
const [update, setUpdate] = useState(false);
|
||||
useEffect(() => {
|
||||
setUpdate(true);
|
||||
}, [selected]);
|
||||
|
||||
return (
|
||||
<Link href={href}>
|
||||
<a
|
||||
|
||||
@@ -51,7 +51,6 @@ const useLocation = ({ base = '' } = {}) => {
|
||||
// that's why we store the last pathname in a ref.
|
||||
const checkForUpdates = () => {
|
||||
const pathname = getCurrentPathname(base);
|
||||
console.log('CHECK FOR UPDATES', pathname);
|
||||
prevPath.current !== pathname && update((prevPath.current = pathname));
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import Store from '../store';
|
||||
|
||||
const usePage = fields => {
|
||||
useEffect(() => {
|
||||
console.log('Use page effect');
|
||||
Store.update(s => {
|
||||
s.currentPage = fields;
|
||||
});
|
||||
|
||||
@@ -23,7 +23,6 @@ export const setSettings = settings => {
|
||||
export const setDone = (list, item, done) => {
|
||||
Store.update((s, o) => {
|
||||
const listIndex = o.lists.findIndex(l => l === list);
|
||||
console.log('Setting done', list, item, done, o.lists, listIndex);
|
||||
const itemIndex = o.lists[listIndex].items.findIndex(i => i === item);
|
||||
s.lists[listIndex].items[itemIndex].done = done;
|
||||
if (list === o.selectedList) {
|
||||
@@ -31,9 +30,3 @@ export const setDone = (list, item, done) => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const setSelectedList = list => {
|
||||
Store.update(s => {
|
||||
s.selectedList = list;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user