jonogon / jonogon-mono

Take Action on Issues you care about
MIT License
37 stars 33 forks source link

Next query in the login URL will be set to redirect after login accor… #19

Closed Wanna-be-Coder closed 2 months ago

Wanna-be-Coder commented 2 months ago

It is done according to the issue: Login should respect the "?next=[url]" query parameter such that the user can be redirected properly upon login completion #13

omranjamal commented 2 months ago

Sorry can't merge this. The useEffect is not necessary in this code; it is increasing code complexity needlessly. Please use useEffect sparingly.

omranjamal commented 2 months ago

Also, prefer using existing libraries in the codebase such as react-user-query-params instead of custom solutions.

omranjamal commented 2 months ago

Hey, could you use https://www.npmjs.com/package/react-use-query-params instead?

omranjamal commented 2 months ago

NIcely done! Thanks.