Skip to content

Commit c62a03c

Browse files
committed
fix(collections): no children warning missing for newly created collection
1 parent 65cc57e commit c62a03c

File tree

1 file changed

+2
-2
lines changed
  • apps/client/src/widgets/type_widgets

1 file changed

+2
-2
lines changed

apps/client/src/widgets/type_widgets/Book.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { t } from "../../services/i18n";
22
import Alert from "../react/Alert";
3-
import { useNoteLabel, useTriliumEvent } from "../react/hooks";
3+
import { useNoteLabelWithDefault, useTriliumEvent } from "../react/hooks";
44
import RawHtml from "../react/RawHtml";
55
import { TypeWidgetProps } from "./type_widget";
66
import "./Book.css";
@@ -9,7 +9,7 @@ import { useEffect, useState } from "preact/hooks";
99
const VIEW_TYPES = [ "list", "grid" ];
1010

1111
export default function Book({ note }: TypeWidgetProps) {
12-
const [ viewType ] = useNoteLabel(note, "viewType");
12+
const [ viewType ] = useNoteLabelWithDefault(note, "viewType", "grid");
1313
const [ shouldDisplayNoChildrenWarning, setShouldDisplayNoChildrenWarning ] = useState(false);
1414

1515
function refresh() {

0 commit comments

Comments
 (0)