mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-14 20:19:34 +01:00
fix: use head instance from plugin
This commit is contained in:
committed by
Benjamin Canac
parent
f1ed0076e5
commit
791804b2fb
@@ -3,8 +3,9 @@ import colors from '#tailwind-config/theme/colors'
|
||||
|
||||
export default defineNuxtPlugin({
|
||||
enforce: 'post',
|
||||
setup () {
|
||||
setup (nuxtApp) {
|
||||
const appConfig = useAppConfig()
|
||||
const head = nuxtApp.vueApp._context.provides.usehead
|
||||
|
||||
const root = computed(() => {
|
||||
const primary: Record<string, string> | undefined = colors[appConfig.ui.primary]
|
||||
@@ -32,7 +33,7 @@ export default defineNuxtPlugin({
|
||||
appConfig.ui.gray = window.localStorage.getItem('nuxt-ui-gray') || appConfig.ui.gray
|
||||
}
|
||||
if (process.server) {
|
||||
useHead({
|
||||
head.push({
|
||||
script: [
|
||||
{
|
||||
innerHTML: `
|
||||
|
||||
Reference in New Issue
Block a user