File tree Expand file tree Collapse file tree
apps/roam/src/components/settings Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import {
1212 DiscourseNodeTextPanel ,
1313} from "./components/BlockPropSettingPanels" ;
1414
15+ const TEMPLATE_SETTING_KEYS = [ "template" ] ;
16+
1517const BlockRenderer = ( { uid } : { uid : string } ) => {
1618 const containerRef = useRef < HTMLDivElement > ( null ) ;
1719
@@ -86,7 +88,7 @@ const DiscourseNodeSuggestiveRules = ({
8688 nodeType = { node . type }
8789 title = "Template"
8890 description = { `The template that auto fills ${ node . text } page when generated.` }
89- settingKeys = { [ "template" ] }
91+ settingKeys = { TEMPLATE_SETTING_KEYS }
9092 uid = { templateUid }
9193 />
9294
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ import {
2727import createBlock from "roamjs-components/writes/createBlock" ;
2828import updateBlock from "roamjs-components/writes/updateBlock" ;
2929
30+ const TEMPLATE_SETTING_KEYS = [ "template" ] ;
31+
3032export const getCleanTagText = ( tag : string ) : string => {
3133 return tag . replace ( / ^ # + / , "" ) . trim ( ) . toUpperCase ( ) ;
3234} ;
@@ -350,7 +352,7 @@ const NodeConfig = ({
350352 nodeType = { node . type }
351353 title = "Template"
352354 description = { `The template that auto fills ${ node . text } page when generated.` }
353- settingKeys = { [ "template" ] }
355+ settingKeys = { TEMPLATE_SETTING_KEYS }
354356 uid = { templateUid }
355357 />
356358 </ div >
You can’t perform that action at this time.
0 commit comments