2022-03-29 23:30:23 +02:00
|
|
|
import { defineStore } from "pinia";
|
|
|
|
|
|
|
|
export const useStore = defineStore({
|
|
|
|
id: "counter",
|
|
|
|
state: () => ({
|
|
|
|
language: "fr-FR",
|
|
|
|
}),
|
|
|
|
persist: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2023-01-17 16:46:50 +01:00
|
|
|
actions: {
|
|
|
|
changeLanguage() {
|
|
|
|
this.language = this.language == "fr-FR" ? "en-US" : "fr-FR"
|
|
|
|
},
|
|
|
|
},
|
2022-03-29 23:30:23 +02:00
|
|
|
});
|