lubiah / svelte-cusdis

Cusdis integration for svelte
2 stars 0 forks source link

SSR #2

Closed korzh875 closed 1 year ago

korzh875 commented 1 year ago

Hello

thanks for the library

but it doesn't work in some cases

for example, when going to other pages with ssr

here is the emulation

or press the restart button or add something to the template and save, the comment form disappears

https://stackblitz.com/edit/daisyui-sveltekit-ubtpn9?file=package.json

lubiah commented 1 year ago

Hi, when navigating to other pages in SSR, the library works. You aren't actually navigating to another page in the example you provided.

korzh875 commented 1 year ago

this is an emulation of moving to another page

korzh875 commented 1 year ago

can you make it so that when the component is restarted, it is initialized again?

https://svelte.dev/repl/286559382580492c8288e53a3597d7e1?version=3.28.0

lubiah commented 1 year ago

Alright, I will take a look at it today

lubiah commented 1 year ago

Hello @korzh875 , I finally fixed it, it's working as intended.

preview

lubiah commented 1 year ago

I've published a new version with the problem fixed

korzh875 commented 1 year ago

not working

https://stackblitz.com/edit/daisyui-sveltekit-bhcewp?file=package.json 0.0.5 https://stackblitz.com/edit/daisyui-sveltekit-evnxjl?file=package.json 0.0.6

the new version of the package is not installed or the installation fails

lubiah commented 1 year ago

@korzh875 , I think it's working, please take a look at the readme. There was another issue open which made me make changes to the whole library.

In the link you also sent, you are using version 0.0.5 and I just published 0.0.6

korzh875 commented 1 year ago

https://stackblitz.com/edit/daisyui-sveltekit-evnxjl?file=package.json

0.0.6 Version not working

Do Not install correctly

lubiah commented 1 year ago

https://github.com/kudadam/svelte-cusdis#props. Use the props here instead. It doesn't use the attr props again

korzh875 commented 1 year ago

like this?

<Cusdis attrs = {{ appId: "2f49c941-a723-4350-a9eb-cad6fab4772b", pageId: "1", pageUrl: "https:localhost:3000", pageTitle: "Svelte Cusdis" }} />

korzh875 commented 1 year ago

did you publish the package correctly!?

Why did you re-upload the project to GitHub? I do not see the changes that you made, because everything has changed!

korzh875 commented 1 year ago

Please open this issue until it is resolved

lubiah commented 1 year ago

I had to do a force push to github

korzh875 commented 1 year ago

check if your library is correct, as it's in the comment above where version 0.0.6 just doesn't work

or show how the component should be initialized

lubiah commented 1 year ago
<Cusdis
appId="2f49c941-a723-4350-a9eb-cad6fab4772b"
pageId="demo"
Url="demo"
pageTitle="demo"
/>
lubiah commented 1 year ago

Unless evening time, right now I'm at work

korzh875 commented 1 year ago

https://stackblitz.com/edit/daisyui-sveltekit-wgtelw?file=src%2Froutes%2F%2Bpage.svelte

doesnt work :(

korzh875 commented 1 year ago

https://www.npmjs.com/package/svelte-cusdis/v/0.0.5?activeTab=code compare https://www.npmjs.com/package/svelte-cusdis/v/0.0.6?activeTab=code

wrong package.json

lubiah commented 1 year ago

Hi, thanks for alerting me, I have seen where the mistake is originating from, I will fix it this evening

lubiah commented 1 year ago

@korzh875 , I have fixed it, can you confirm it on your end for me

korzh875 commented 1 year ago

works fine

korzh875 commented 1 year ago

pls remove console.log("Destroyed");

lubiah commented 1 year ago

oh sorry😂😂

lubiah commented 1 year ago

Done