fix: useStorage in ssr & extract random

This commit is contained in:
YunYouJun
2023-07-30 16:31:37 +08:00
parent 033d6adbe6
commit 5164279311
13 changed files with 147 additions and 148 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts" setup>
import { storeToRefs } from 'pinia'
import recipes from '~/data/recipe.json'
defineProps({
isVisible: Boolean,
@@ -11,7 +12,7 @@ const { displayedRecipe } = storeToRefs(rStore)
<template>
<button
v-show="displayedRecipe.length !== rStore.recipes.length && isVisible"
v-show="displayedRecipe.length !== recipes.length && isVisible"
class="fixed z-9 inline-flex cursor-pointer items-center justify-center rounded rounded-full shadow hover:shadow-md"
bg="green-50 dark:green-900" w="10" h="10"
bottom="18" right="4"