File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
apps/client/src/widgets/type_widgets Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 11import { t } from "../../services/i18n" ;
22import Alert from "../react/Alert" ;
3- import { useNoteLabel , useTriliumEvent } from "../react/hooks" ;
3+ import { useNoteLabelWithDefault , useTriliumEvent } from "../react/hooks" ;
44import RawHtml from "../react/RawHtml" ;
55import { TypeWidgetProps } from "./type_widget" ;
66import "./Book.css" ;
@@ -9,7 +9,7 @@ import { useEffect, useState } from "preact/hooks";
99const VIEW_TYPES = [ "list" , "grid" ] ;
1010
1111export 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 ( ) {
You can’t perform that action at this time.
0 commit comments