Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
danloh committed Mar 3, 2024
1 parent bae4b44 commit cbbd79a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

2024-XX-XX

- [ ] Organize notes using Kanban
- Organize notes using Kanban

## app-v0.5.8

Expand Down
4 changes: 2 additions & 2 deletions src/components/kanban/updateCard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Id, KanbanData, CardItem, Kanbans } from './types';
const updateCard = async (id: Id, noteId: string | string[], oldTitle?: string) => {
const initDir = store.getState().initDir;
const currentKb = store.getState().currentBoard;
console.log("currentKb", currentKb);
// console.log("currentKb", currentKb);
if (!initDir || !currentKb.trim()) return;

const [title, itemUri, category] = typeof noteId === "string"
Expand All @@ -35,7 +35,7 @@ const updateCard = async (id: Id, noteId: string | string[], oldTitle?: string)
uri: itemUri,
category,
};
console.log("old title in card: ", oldTitle)
// console.log("old title in card: ", oldTitle)
if (oldTitle) {
// filter out old one
const newItems = items.filter(itm => rmFileNameExt(itm.name) !== oldTitle);
Expand Down
7 changes: 2 additions & 5 deletions src/components/view/kanban.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ export default function Kanban() {
const setCurrentKanban = useStore((state) => state.setCurrentBoard);
const [kanbans, setKanbans] = useState<Kanbans>({});

console.log("currentKanban", currentKanban, kanbans);
// console.log("currentKanban", currentKanban, kanbans);

useEffect(() => {
const kanbanJsonPath = initDir ? joinPath(initDir, `kanban.json`) : '';
if (kanbanJsonPath) {
const jsonFile = new FileAPI(kanbanJsonPath);
jsonFile.readFile().then(json => {
const kanbans: Kanbans = JSON.parse(json || "{}");
console.log("effect Kanbans", kanbans);

// console.log("effect Kanbans", kanbans);
setKanbans(kanbans);
});
}
Expand Down Expand Up @@ -51,8 +50,6 @@ export default function Kanban() {
return kanbans[name] ?? {columns: [], cards: []};
}, [currentKanban, kanbans]);

console.log("KanbanData", kanbanData);

return (
<ErrorBoundary>
<div className="flex flex-col overflow-x-auto">
Expand Down

0 comments on commit cbbd79a

Please sign in to comment.