eidellev / inertiajs-adonisjs

280 stars 17 forks source link

@inertiaHead don't work #85

Closed Reptiluka closed 1 year ago

Reptiluka commented 1 year ago

Hi ! I use import { Head } from '@inertiajs/inertia-vue3' i think, and the content i put in , is rendered inside the div of the app as a tag, but not added in the where @inertiaHead is placed.

I use SSR, do you have an idea ?

Thanks !

Reptiluka commented 1 year ago

I was trying to include a component inside my tag, and it was render as <[object Object] inertia> But if i put the Head component, in the child component instead, it works i think, i don't know if it's on your side or not

Reptiluka commented 1 year ago

image Now the < Head > content is at the right place, but with comma ( , ) when rendered in SSR

Reptiluka commented 1 year ago

And with that bug, when the client side code load, it put also , the same meta tag in the < body > :/

eidellev commented 1 year ago

Thanks for reporting this issue @Reptiluka I will investigate and let you know when it's solved

SH8GH commented 1 year ago

image Now the < Head > content is at the right place, but with comma ( , ) when rendered in SSR

@eidellev The Issue In provider/InertiaProvider React too. The Issue Is Here

 const arr = [1, 2, 3, 4]
 arr.join() // 1,2,3,4
 arr.join('\n')
  // => 
  // 1
  // 2
  // 3
  // 4
eidellev commented 1 year ago

@KimhoutSam thanks! I solved the issue with the comma in v7.0.1

@Reptiluka I couldn't reproduce the issue you reported client-side with the react adapter so I suspect it's a problem with the inertia Vue3 adapter or perhaps something on your end (I haven't used vue in years so I'm not super confident about this). Either way, feel free to open another issue if you run into additional trouble.

Reptiluka commented 1 year ago

@KimhoutSam thanks! I solved the issue with the comma in v7.0.1

@Reptiluka I couldn't reproduce the issue you reported client-side with the react adapter so I suspect it's a problem with the inertia Vue3 adapter or perhaps something on your end (I haven't used vue in years so I'm not super confident about this). Either way, feel free to open another issue if you run into additional trouble.

It's me who reported the issue with the comma haha 🙃 kimhoutsam just saying he had the same problem.

Thank you for the fix ! 😀