Files
cook/app/composables/store/history.ts
2024-09-15 18:07:50 +08:00

11 lines
292 B
TypeScript

import { useStorage } from '@vueuse/core'
import { namespace } from '~/constants'
import type { RecipeItem } from '~/types'
export interface RecipeHistoryItem {
recipe: RecipeItem
time: number
}
export const recipeHistories = useStorage<RecipeHistoryItem[]>(`${namespace}:history`, [])