Migration to nuxt 4
Used codemods CLI and reworked most alias'd path that stopped working
This commit is contained in:
12
app/stores/CharacterStore.ts
Normal file
12
app/stores/CharacterStore.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import type { Character } from "@@/models/Characters"
|
||||
import { defineStore } from "pinia"
|
||||
|
||||
export const useCharacters = defineStore("characters", () => {
|
||||
const characters = ref<Character[]>([])
|
||||
|
||||
async function setCharacters(data: Character[]) {
|
||||
characters.value = data
|
||||
}
|
||||
|
||||
return { characters, setCharacters }
|
||||
})
|
||||
Reference in New Issue
Block a user