MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / commit

Function commit

packages/app-core/src/components/OnboardingWizard.tsx:797–815  ·  view source on GitHub ↗
(patch: {
    primaryNotesLocation?: PrimaryNotesLocation
    dailyEnabled?: boolean
    dailyDirectory?: string
  })

Source from the content-addressed store, hash-verified

795 }, [dailyDirectory])
796
797 const commit = (patch: {
798 primaryNotesLocation?: PrimaryNotesLocation
799 dailyEnabled?: boolean
800 dailyDirectory?: string
801 }): void => {
802 const current = useStore.getState().vaultSettings
803 void setVaultSettings({
804 ...current,
805 primaryNotesLocation: patch.primaryNotesLocation ?? current.primaryNotesLocation,
806 dailyNotes: {
807 ...current.dailyNotes,
808 enabled: patch.dailyEnabled ?? current.dailyNotes.enabled,
809 directory:
810 patch.dailyDirectory !== undefined
811 ? normalizeDailyNotesDirectory(patch.dailyDirectory)
812 : current.dailyNotes.directory
813 }
814 })
815 }
816
817 if (!hasVault) {
818 return (

Callers 1

LayoutStepFunction · 0.70

Calls 2

setVaultSettingsFunction · 0.50

Tested by

no test coverage detected