cboard icon indicating copy to clipboard operation
cboard copied to clipboard

First time visitor closing AuthScreen renders WelcomeScreen

Open zkarmi opened this issue 6 months ago • 3 comments

Issue

Spinning this off of #1930 per discussion with @RodriSanchez1:

When a new user to the site visits the root path (/), the WelcomeScreen component is rendered. #1930 aims to make the AuthScreen (/login-signup) Close (X) button send the user to / if they do not have any browsing history on the app. In this case, closing the AuthScreen via this button renders WelcomeScreen because isFirstVisit && !isLogged is true, when sending the user to /board/root makes more sense: https://github.com/cboard-org/cboard/blob/1a7e0a97a963ad42636242cb1ced58d2c83a6a5a/src/components/App/App.component.js#L84-L90

Steps to reproduce from AuthScreen:

  1. Visit /login-signup
  2. Run localStorage.removeItem('persist:root') from console
  3. Reload page
  4. Click X button in top left

Expected Behavior

User is redirected to the root board, similarly to if selecting "Skip for now" from WelcomeScreen.

Actual Behavior

User is shown WelcomeScreen, which is redundant.

https://github.com/user-attachments/assets/62e290a8-bbbb-415e-baf1-fb017b4a2e41

zkarmi avatar Jun 20 '25 19:06 zkarmi

Assign This issue To me ,, I can fix this .

Harshitraaaj avatar Jun 28 '25 10:06 Harshitraaaj

@Harshitraaaj Hi! Welcome to the Cboard project. I just assigned the issue to you! Thanks

RodriSanchez1 avatar Jul 01 '25 18:07 RodriSanchez1

@RodriSanchez1 Bro look at my pull req.

Harshitraaaj avatar Jul 02 '25 17:07 Harshitraaaj