DevvJobs/candidates-web

Chat: Redirect to `/chat` if contact with id from url was not found (only when there are no contacts)

Closed this issue · 6 comments

Right now if user mistypes in chat url, page will show loader on the place of messages.
Instead we should redirect to /chat route.

Could you please help me reproduce this issue?

Currently, if I have open the chat page with a path, like this:
/profile/chat/zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz

then mistyping the uuid and pressing the Return key, will redirect me to the chat page and display the chat list. The loader will promptly disappear.

@lilsweetcaligula if you type wrong id after profile/chat/ and don't press any keys, you should see something like this (if you have any contacts, you will not see empty contacts message, just loader)
screenshot_20190225_111019

My suggestion is to redirect user to /profile/chat in case like this right away, without waiting for them to press Return, Back or anything else.

Oh, I see now. It only seems to happen when you have no chats at all.

@lilsweetcaligula tested, you are right, I changed title of the issue.

The #22 has been deployed to https://dev.devv.jobs now.