diff --git a/RollCallClient/src/store/token.js b/RollCallClient/src/store/token.js new file mode 100644 index 0000000..1079d1c --- /dev/null +++ b/RollCallClient/src/store/token.js @@ -0,0 +1,25 @@ +import { defineStore } from 'pinia'; +import {ref} from "vue"; + +export const useTokenStore = defineStore( + 'token', + () => { + + const token = ref('') + + const setToken = (newToken) => { + token.value = newToken + } + + const removeToken = () => { + token.value = '' + } + + return { + token, setToken, removeToken + } + }, + { + persist: true + } +) \ No newline at end of file diff --git a/RollCallClient/src/store/username.js b/RollCallClient/src/store/username.js new file mode 100644 index 0000000..9e3f5f1 --- /dev/null +++ b/RollCallClient/src/store/username.js @@ -0,0 +1,25 @@ +import { defineStore } from 'pinia'; +import { ref } from "vue"; + +export const useUsernameStore = defineStore( + 'username', + () => { + + const username = ref('') + + const setUsername = (newUsername) => { + username.value = newUsername + } + + const removeUsername = () => { + username.value = '' + } + + return { + username, setUsername, removeUsername + } + }, + { + persist: true + } +) \ No newline at end of file