Skip to content

Commit edf581d

Browse files
use useTemplateRef instead of ref
1 parent 368b388 commit edf581d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/ui/components/Checkout/Checkout.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { onMounted, onUnmounted, ref, type ComputedRef, computed } from 'vue'
2+
import { onMounted, onUnmounted, ref, useTemplateRef, type ComputedRef, computed } from 'vue'
33
import { createErc20Contract } from '@devprotocol/dev-kit'
44
import {
55
positionsCreate,
@@ -53,7 +53,7 @@ const REGEX_DESC_EMAIL = /{EMAIL}/g
5353
const i18nBase = i18nFactory(Strings)
5454
let i18n = ref<ReturnType<typeof i18nBase>>(i18nBase(['en']))
5555
56-
const imageRef = ref<HTMLImageElement | null>(null)
56+
const imageRef = useTemplateRef(`imageRef`)
5757
5858
type Props = {
5959
amount?: number

src/ui/components/Checkout/Result.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script lang="ts" setup>
2-
import { onMounted, ref, type ComputedRef, computed } from 'vue'
2+
import { onMounted, ref, useTemplateRef, type ComputedRef, computed } from 'vue'
33
import { type UndefinedOr, whenDefinedAll } from '@devprotocol/util-ts'
44
import { JsonRpcProvider } from 'ethers'
55
import Skeleton from '../Skeleton/Skeleton.vue'
@@ -16,7 +16,7 @@ import VideoFetch from '../../vue/VideoFetch.vue'
1616
const i18nBase = i18nFactory(Strings)
1717
let i18n = i18nBase(['en'])
1818
19-
const imageRef = ref<HTMLImageElement | null>(null)
19+
const imageRef = useTemplateRef(`imageRef`)
2020
2121
type Props = {
2222
eoa?: string

src/ui/vue/VideoFetch.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup>
2-
import { onMounted, ref } from 'vue'
2+
import { onMounted, useTemplateRef } from 'vue'
33
import MP4Box from 'mp4box'
44
55
const props = defineProps({
@@ -18,7 +18,7 @@ const props = defineProps({
1818
})
1919
2020
// Refs and variables
21-
const videoElement = ref(null)
21+
const videoElement = useTemplateRef(`videoElement`)
2222
let mediaSource = null
2323
let sourceBuffers = {}
2424
let mp4boxfile = null

0 commit comments

Comments
 (0)