File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/client/theme-default/components Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,11 @@ const prefix = computed(() => {
2323 return p === true ? ' Last Updated' : p
2424})
2525
26- const datetime = computed (() => {
27- return new Date (page .value .lastUpdated ).toLocaleString (' en-US' )
26+ const datetime = ref (' ' )
27+ onMounted (() => {
28+ // locale string might be different based on end user
29+ // and will lead to potential hydration mismatch if calculated at build time
30+ datetime .value = new Date (page .value .lastUpdated ).toLocaleString (' en-US' )
2831})
2932 </script >
3033
@@ -33,7 +36,7 @@ const datetime = computed(() => {
3336 display : inline-block ;
3437 margin : 0 ;
3538 line-height : 1.4 ;
36- font-size : .9rem ;
39+ font-size : 0 .9rem ;
3740 color : var (--c-text-light );
3841}
3942
You can’t perform that action at this time.
0 commit comments