fix: ssr for emojis

zio/stable
Anthony Fu 2022-12-27 21:56:43 +01:00
parent 2f8e47c947
commit c38b8c13ca
1 changed files with 7 additions and 5 deletions

View File

@ -76,9 +76,11 @@ export async function setupI18n() {
}
export async function setupEmojis() {
const promise = import('@emoji-mart/data').then(r => r.default)
const { init } = await import('emoji-mart')
init({
data: () => promise,
})
if (process.client) {
const promise = import('@emoji-mart/data').then(r => r.default)
const { init } = await import('emoji-mart')
init({
data: () => promise,
})
}
}