Skip to content

Commit 9cd2ce6

Browse files
committed
refactor: using the h function
1 parent d126850 commit 9cd2ce6

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

packages/auth/UserContextProvider.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import { Session, SupabaseClient, User } from '@supabase/supabase-js'
2-
import {
3-
PropType,
4-
defineComponent,
5-
h,
6-
nextTick,
7-
onMounted,
8-
provide,
9-
ref
10-
} from 'vue'
2+
import { PropType, defineComponent, h, onMounted, provide, ref } from 'vue'
113

124
import { UserContextProviderKey } from '../types'
135

@@ -19,7 +11,7 @@ export default defineComponent({
1911
required: true
2012
}
2113
},
22-
setup({ supabaseClient }) {
14+
setup({ supabaseClient }, { slots }) {
2315
const session = ref<Session | null>(null)
2416
const user = ref<User | null>(null)
2517

@@ -45,9 +37,8 @@ export default defineComponent({
4537
session,
4638
user
4739
})
48-
},
49-
render() {
50-
return h('div', null, this.$slots?.default?.())
40+
41+
return () => h('div', null, slots?.default?.())
5142
}
5243
})
5344

0 commit comments

Comments
 (0)