RamiAwar / dataline

Chat with your data - AI data analysis and visualization on CSV, Postgres, MySQL, Snowflake, SQLite...
https://dataline.app
GNU General Public License v3.0
502 stars 49 forks source link

Move to tanstack router #254

Closed anthony2261 closed 1 month ago

anthony2261 commented 1 month ago

Closes #236 <3

RamiAwar commented 1 month ago

Other comments:

anthony2261 commented 1 month ago

@RamiAwar

Didn't see any changes relating to the landing page metadata, which was the whole point of this rewrite.

Better not to mix moving to tanstack and messing around with context in the same PR, we can do this next

Are we still separating landing / app?

Yes, see code inside src/routes/__root.tsx, src/routes/_app.tsx and frontend/src/routes/_landing.tsx

Clarification: The code inside _app.tsx runs whenever any path inside _app/ is reached, eg. /_app/user (_app is not actually shown in the URL, but tells the code which logical path it falls under). So, if you open the /user endpoint, the code will run the beforeLoad method inside _app.tsx, and redirect you to / if NODE_ENV is not local

anthony2261 commented 1 month ago

I need to test that auth works. Might need to make a small addition to beforeLoad