mirror of
https://github.com/ArthurDanjou/website.git
synced 2026-01-23 08:20:33 +01:00
working on talents actualisation
This commit is contained in:
@@ -11,7 +11,7 @@ export const useColorStore = defineStore(
|
||||
appConfig.ui.primary = newColor
|
||||
}, { immediate: true })
|
||||
|
||||
const setColor = (color: string) => {
|
||||
function setColor(color: string) {
|
||||
colorCookie.value = color as ColorsTheme
|
||||
}
|
||||
|
||||
|
||||
30
src/store/talents.ts
Normal file
30
src/store/talents.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useTalentsStore = defineStore(
|
||||
'talents',
|
||||
() => {
|
||||
const currentCategory = ref<string>('all')
|
||||
const currentFavorite = ref<boolean>(false)
|
||||
|
||||
const getCategory = computed(() => currentCategory)
|
||||
const isFavorite = computed(() => currentFavorite)
|
||||
|
||||
function setCategory(category: string) {
|
||||
currentCategory.value = category
|
||||
}
|
||||
|
||||
function setFavorite() {
|
||||
currentFavorite.value = !currentFavorite.value
|
||||
}
|
||||
|
||||
return {
|
||||
getCategory,
|
||||
setCategory,
|
||||
setFavorite,
|
||||
isFavorite,
|
||||
}
|
||||
},
|
||||
{
|
||||
persist: true,
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user