✨ (app) add custom title when recording
This commit is contained in:
16
src/shared/useLoopyTitle.ts
Normal file
16
src/shared/useLoopyTitle.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { useTitle } from '@vueuse/core'
|
||||
import { onUnmounted } from 'vue'
|
||||
|
||||
export const useLoopyTitle = (title: string) => {
|
||||
if (title) {
|
||||
useTitle(title, {
|
||||
titleTemplate: '%s | Loopycode'
|
||||
})
|
||||
} else {
|
||||
useTitle('Loopycode')
|
||||
}
|
||||
|
||||
onUnmounted(() => {
|
||||
useTitle('Loopycode')
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user