Files
cook/app/composables/store/history.ts
2024-12-30 02:02:12 +08:00

11 lines
292 B
TypeScript

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