DEV Community

Discussion on: Dark theme for (almost) everything

Collapse
 
loretoruiz profile image
Robinson Loreto

Hola que tal. Recien empiezo a desarollar una aplicacion con ReactJS, con backend conectado a una BD Sql Server. Lo que quiero es que por favor me ayuden con la logica a la hora de Iniciar sesion. Actualmente guardo de forma Local con el LocalStorage el token generado por el backend y ademas de esto manejo en un estado global con redux una variable "is_logged" que me toma true cuando es correcto el inicio y false cuando no es correcto. Lo que no se es como manejar, a partir de esa variable "is_logged" el redireccionamiento a , por ejemplo: /dashboard, y a proteger todas las rutas dentro de ese dashboard, y ademas, si se ubica en el login y ya esta logueado lo ignore y se quede en el Dashboard igual. Espero me puedan ayudar ! saludos desde Venezuela.

Collapse
 
thiagobraga profile image
Thiago Braga

Hola amigo, perdóname por errores gramaticales o ortográficos. No es el tema de la publicación, pero no hay problema, ¿estás usando React Router? Si no, lo recomiendo. Hay un tutorial, React Training que ayuda mucho a entender. Espero que te sirva de ayuda.

reacttraining.com/react-router/web...

Collapse
 
parrol profile image
parrol

Hey! I know this is out of topic, but I wanted to address your response in Spanish. It was perfect! (almost).

There's one mistake that even native speakers make:

"Si no" vs "sino"

You can see them as a conditional structure "if" you haven't done something "then" something else <-- here if represents "si no" "si no has hecho algo". then represents "sino" it it's used after the action you assume couldn't be done.

-Are you using React Router? If not, I recommend it.
-¿estás usando React Router? Sino, lo recomiendo

Another way to say it:
-If you're not using React Router, I recommend it.

-"Si no" estás usando React Router, lo recomiendo.

When using "or" (o) in Spanish before a word that starts with "o" you use "u"

-gramaticales u ortográficos.

Hope this helps and you can correct me too! I'm also Venezuelan and would like to write good English.

Thread Thread
 
parrol profile image
parrol

And also, your themes rock lml

Thread Thread
 
thiagobraga profile image
Thiago Braga • Edited

It was perfect! (almost).

😆😆😆😆

And also, your themes rock lml

Thank you so much! 😊

When using "or" (o) in Spanish before a word that starts with "o" you use "u"
-gramaticales u ortográficos.

I didn't know that. Thank you. I am not very good with Spanish, but I'm learning. ☺️

-Are you using React Router? If not, I recommend it.
-¿estás usando React Router? Sino, lo recomiendo

Perfect example! It makes perfect sense.

Some comments have been hidden by the post's author - find out more