Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
fix hydration
Browse files Browse the repository at this point in the history
  • Loading branch information
NextFire committed Mar 25, 2024
1 parent 57fba6a commit 01d28c5
Show file tree
Hide file tree
Showing 6 changed files with 156 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ const expenseFormStore = useExpenseFormStore();
<span class="flex-1"
>Paid by <b>{{ author?.name }}</b></span
>
<span>{{
new Date(expense.date).toLocaleDateString(undefined, {
timeZone: "UTC",
dateStyle: "long",
})
}}</span>
<span>
{{
new Date(expense.date).toLocaleDateString(undefined, {
timeZone: "UTC",
dateStyle: "long",
})
}}
</span>
</p>

<div class="flex flex-col sm:flex-row text-xs">
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
devtools: { enabled: true },
modules: ["@nuxtjs/tailwindcss", "@pinia/nuxt"],
modules: ["@nuxtjs/tailwindcss", "@pinia/nuxt", "@vueuse/nuxt"],
app: {
head: {
// https://github.com/saadeghi/daisyui/issues/1732
Expand Down
141 changes: 141 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"@prisma/client": "5.11.0",
"@tailwindcss/typography": "0.5.10",
"@types/lodash": "4.17.0",
"@vueuse/core": "^10.9.0",
"@vueuse/nuxt": "^10.9.0",
"chart.js": "4.4.2",
"daisyui": "4.8.0",
"dinero.js": "2.0.0-alpha.14",
Expand Down
10 changes: 4 additions & 6 deletions pages/[id].vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ watchEffect(() => {
const tabId = ref(0);
const currentMemberStr = useCookie(`${countId}_currentMember`);
currentMemberStr.value = currentMemberStr.value ?? "";
const currentMember = computed(() => {
const id = currentMemberStr.value;
return id ? parseInt(id) : undefined;
});
const currentMemberStr = useLocalStorage(`${countId}_currentMember`, "");
const currentMember = computed(() =>
currentMemberStr.value ? parseInt(currentMemberStr.value) : undefined
);
</script>

<template>
Expand Down

0 comments on commit 01d28c5

Please sign in to comment.