mirror of
https://github.com/zadam/trilium.git
synced 2025-11-21 08:04:24 +01:00
fix(collections): no children warning missing for newly created collection
This commit is contained in:
parent
65cc57ec03
commit
c62a03c97b
@ -1,6 +1,6 @@
|
||||
import { t } from "../../services/i18n";
|
||||
import Alert from "../react/Alert";
|
||||
import { useNoteLabel, useTriliumEvent } from "../react/hooks";
|
||||
import { useNoteLabelWithDefault, useTriliumEvent } from "../react/hooks";
|
||||
import RawHtml from "../react/RawHtml";
|
||||
import { TypeWidgetProps } from "./type_widget";
|
||||
import "./Book.css";
|
||||
@ -9,7 +9,7 @@ import { useEffect, useState } from "preact/hooks";
|
||||
const VIEW_TYPES = [ "list", "grid" ];
|
||||
|
||||
export default function Book({ note }: TypeWidgetProps) {
|
||||
const [ viewType ] = useNoteLabel(note, "viewType");
|
||||
const [ viewType ] = useNoteLabelWithDefault(note, "viewType", "grid");
|
||||
const [ shouldDisplayNoChildrenWarning, setShouldDisplayNoChildrenWarning ] = useState(false);
|
||||
|
||||
function refresh() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user