Skip to content

Commit 328facd

Browse files
committed
docs: fix SSG build errors in date example and playground
- Remove invalid firstDayOfWeek arg from getWeekdays call in calendar example - Guard window access with IN_BROWSER in playground redirect page - Correct getWeekdays signature in use-date docs
1 parent 5155d34 commit 328facd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

apps/docs/src/examples/composables/use-date/calendar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
const { adapter } = useDate()
66
77
const current = shallowRef(adapter.date()!)
8-
const weekdays = computed(() => adapter.getWeekdays(0, 'narrow'))
8+
const weekdays = computed(() => adapter.getWeekdays('narrow'))
99
const weeks = computed(() => {
1010
const allWeeks = adapter.getWeekArray(current.value)
1111
// Always show exactly 5 weeks for consistent height

apps/docs/src/pages/composables/plugins/use-date.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ interface DateAdapter<T> {
167167
setSeconds (date: T, seconds: number): T
168168

169169
// Calendar Utilities
170-
getWeekdays (firstDayOfWeek?: number, format?: 'long' | 'short' | 'narrow'): string[]
170+
getWeekdays (format?: 'long' | 'short' | 'narrow'): string[]
171171
getWeekArray (date: T, firstDayOfWeek?: number): T[][]
172172
getMonthArray (date: T): T[]
173173
getYearRange (start: T, end: T): T[]

apps/docs/src/pages/playground.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { useHead } from '@unhead/vue'
44
55
const target = import.meta.env.VITE_PLAYGROUND_URL ?? 'https://v0play.vuetifyjs.com'
6-
const redirect = `${target}/${window?.location?.hash ?? ''}`
6+
const redirect = `${target}/${IN_BROWSER ? window.location.hash : ''}`
77
88
definePage({
99
meta: {

0 commit comments

Comments
 (0)