File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
hub/src/routes/n/[nook]/template/[templateId] Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 11import { type JSX , Show } from 'solid-js'
22import { EditTemplate } from 'shared-dom/editTemplate'
33import { defaultRenderContainer } from '~/lib/utility'
4- import {
5- cast ,
6- type NookId ,
7- type RemoteTemplateId ,
8- type TemplateId ,
9- } from 'shared/brand'
4+ import { cast , type NookId , type RemoteTemplateId } from 'shared/brand'
105import {
116 type Template ,
127 getDefaultTemplate as getDefaultTemplateOg ,
@@ -22,9 +17,7 @@ import { getUserId } from '~/session'
2217import { useThemeContext } from 'shared-dom/themeSelector'
2318import { useIsModContext } from '~/components/isModContext'
2419import { cwaClient } from '~/routes/cwaClient'
25-
26- const getDefaultTemplate = ( ) =>
27- getDefaultTemplateOg ( crypto . randomUUID ( ) as TemplateId ) // highTODO
20+ import { base64urlId } from 'shared/binary'
2821
2922const saveButton = ( template : { template : Template } ) => (
3023 < button
@@ -91,7 +84,7 @@ export default function Edit(props: RouteSectionProps): JSX.Element {
9184 < Show when = { isMod ( ) } fallback = { < > You're not a mod.</ > } >
9285 < Show when = { template ( ) } >
9386 < EditTemplate
94- getDefaultTemplate = { getDefaultTemplate }
87+ getDefaultTemplate = { ( ) => getDefaultTemplateOg ( base64urlId ( ) ) }
9588 saveButton = { saveButton }
9689 theme = { theme ( ) }
9790 template = { template ( ) ! }
You can’t perform that action at this time.
0 commit comments