Monorepo containing core modules of Zeichen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
319 B

  1. import Storage from './Storage'
  2. type PluginConfig = {
  3. }
  4. type State = {
  5. currentUserId: string,
  6. }
  7. type Plugin = (config: PluginConfig) => (state: State) => void
  8. const LocalStoragePlugin: Plugin = config => ({
  9. currentUserId,
  10. }) => {
  11. new Storage(currentUserId, 'notes')
  12. new Storage(currentUserId, 'folders')
  13. }