aboutsummaryrefslogtreecommitdiffstats
path: root/web/stores/conference.ts
blob: 2dbe82a5faaacc9eb334bd3ea07c13bb0dbeac13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { useLocalStorage } from "@vueuse/core";
import { defineStore } from "pinia";

export const useConferenceStore = defineStore('conference', () => {
  const id = useLocalStorage('conference/id', null)
  const title = useLocalStorage('conference/title', null)
  const venue = useLocalStorage('conference/venue', null)
  const city = useLocalStorage('conference/city', null)

  const clear = () => {
    id.value = null
    title.value = null
    venue.value = null
    city.value = null
  }
  
  return {id, title, venue, city, clear}
})