Skip to content

Commit 85992e9

Browse files
authored
docs: move preferences from parameter to state (#1137)
1 parent 836ab86 commit 85992e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/docs/core-concepts/actions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,11 @@ import { useAuthStore } from './auth-store'
7676

7777
export const useSettingsStore = defineStore('settings', {
7878
state: () => ({
79+
preferences: null,
7980
// ...
8081
}),
8182
actions: {
82-
async fetchUserPreferences(preferences) {
83+
async fetchUserPreferences() {
8384
const auth = useAuthStore()
8485
if (auth.isAuthenticated) {
8586
this.preferences = await fetchPreferences()

0 commit comments

Comments
 (0)