Skip to content

Commit fe56fe0

Browse files
lint
1 parent 5da317e commit fe56fe0

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/components/Meeting/AddToCal.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import { computed } from 'vue'
3-
import { toCompactISOTimeFromISO} from '../../fixtures'
3+
import { toCompactISOTimeFromISO } from '../../fixtures'
44
55
const props = defineProps<{
66
redirectToUrl: (calendarLink: string | undefined) => void
@@ -19,10 +19,10 @@ const compactExpiryTime = computed(() => {
1919
})
2020
2121
const timeZone = new Intl.DateTimeFormat('en-US', {
22-
timeZoneName: 'short',
23-
}).resolvedOptions().timeZone
22+
timeZoneName: 'short',
23+
}).resolvedOptions().timeZone
2424
25-
console.log("starttime", props.startTime)
25+
console.log('starttime', props.startTime)
2626
const calendarLink = computed(() => {
2727
return `https://calendar.google.com/calendar/r/eventedit?action=TEMPLATE&dates=${compactStartTime.value}%2F${compactExpiryTime.value}&text=${encodeURIComponent(props.description ? props.description : '')}&details=${encodeURIComponent(props.description ? props.description : '')}&location=${encodeURIComponent(props.meetingLink ? props.meetingLink : '')}&stz=${timeZone}&etz=${timeZone}`
2828
})
@@ -36,6 +36,6 @@ const calendarLink = computed(() => {
3636
}
3737
"
3838
>
39-
Add to Calendar 🗓️
39+
Add to Calendar 🗓️
4040
</button>
4141
</template>

src/fixtures/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ export const formatISOTimestamp = (isoTimestamp: string) => {
3131

3232
export const toCompactISOTimeFromISO = (isoTimestamp: string) => {
3333
const date = new Date(isoTimestamp)
34-
const pad = (number: number) => number.toString().padStart(2, '0');
34+
const pad = (number: number) => number.toString().padStart(2, '0')
3535

3636
// Extract components
3737
const year = date.getUTCFullYear()
38-
const month = pad(date.getUTCMonth() + 1); // Months are zero-indexed
39-
const day = pad(date.getUTCDate());
38+
const month = pad(date.getUTCMonth() + 1) // Months are zero-indexed
39+
const day = pad(date.getUTCDate())
4040
const hours = pad(date.getUTCHours())
4141
const minutes = pad(date.getUTCMinutes())
4242
const seconds = pad(date.getUTCSeconds())
43-
43+
4444
return `${year}${month}${day}T${hours}${minutes}${seconds}Z`
4545
}
4646

0 commit comments

Comments
 (0)