Multipage App with Moralis in Javascript

How can I make a multipage application with moralis and javascript so I dont have to login and out on every site.
Im using the template code and my file structrue looks like this

index.html
tokens.html
swap.html
main.js

I use the main.js file for everything but I need the navbar on every site and when placing it on every site I have the login/logout on every html site

When I log in on the index.html site I still have to log in and logout on the tokens.html page

I know react or even flask would be better since I have routing, but how can I solve this in vanillaJS?

why would you have to login again with vanilla js?

how do you loose that session?

thats what i try to find out

i have the boilerplate code on index.html and my logout login button is in the navbar
when I copy the navbar to be on my tokens.html site and I remove the loginbutton I get an error and the code breaks and also when I swich between pages i need to log back in on the tokens.html page in order to see the token even though I already logged in on index.html

I just tested with same html page copied with 2 different names and I didn’t have to login again when visiting the other html page that had identical code as the first one

not working for me
http://understood-wren.surge.sh

I login on HOME and when I switch to alltoken I have to log in again to see the balance

you could try with simpler code

for example?
what can I do

you could copy same page and make small changes and see if it works

isnt this a small change that I did?

hey, looking at this, the home page isnt working for me and i understand what the issue is about the login stuff, do you have a github to the project so i can clone it and take a look ?

home - index.html is just the login page
alltoken.html - gives balance of all token
and than i want to work from here
so user logs in 1 time and than gets stuff rendered according to the page he is on without having to login log out on every page

you got a fix for my issue dude
ohh i can just turn this in a single page app, than it would wiork easily, i might just do that, i think thats easier

yes i have, i am just adding some updates and unnecessary things :sweat_smile: and trying to fix some error that will potentially spring up

this is the updated zip
(https://www.justbeamit.com/hfkw3)
download it

ok cool, no stress, please let me know when you done

i am done :sweat_smile:, the download link only works ones :sweat_smile:

ok cool thanks dude, i will try it

its not working dude, its the same crap as what I had if not worse, lol

how :thinking: it looks good on my end, when you logged in a you switch tab, you should wait a little for it to fetch

oh wait :sweat_smile::sweat_smile:, i think there is a problem on my end, i will send you the updated files
did you see any change there ?
i made a mistake