Skip to content

Commit 04a15b1

Browse files
committed
fix(ui): use useId instead of crypto to create ids
1 parent 4ace78d commit 04a15b1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/ui/client/components/SmallTabs.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { provide, ref } from 'vue'
2+
import { provide, ref, useId } from 'vue'
33
import { idFor, SMALL_TABS_CONTEXT } from '~/composables/small-tabs'
44
55
const activeTab = ref<string | null>(null)
@@ -9,7 +9,7 @@ function setActive(key: string) {
99
activeTab.value = key
1010
}
1111
12-
const id = crypto.randomUUID()
12+
const id = useId()
1313
1414
provide(SMALL_TABS_CONTEXT, {
1515
id,

packages/ui/client/components/VisualRegressionSlider.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import type { TestArtifactAttachment } from '@vitest/runner'
3-
import { computed, ref } from 'vue'
3+
import { computed, ref, useId } from 'vue'
44
import { internalOrExternalUrl } from '~/composables/attachments'
55
import VisualRegressionImageContainer from './VisualRegressionImageContainer.vue'
66
@@ -21,7 +21,7 @@ const maxHeight = computed(() =>
2121
2222
const splitPercentage = ref(50)
2323
24-
const inputId = crypto.randomUUID()
24+
const inputId = useId()
2525
</script>
2626

2727
<template>

0 commit comments

Comments
 (0)