Showing
1 changed file
with
4 additions
and
1 deletions
... | @@ -16,7 +16,10 @@ export const Login: React.FC = () => { | ... | @@ -16,7 +16,10 @@ export const Login: React.FC = () => { |
16 | } | 16 | } |
17 | socket.emit('msg', rawMessage, (response : MessageResponse<undefined>) => { | 17 | socket.emit('msg', rawMessage, (response : MessageResponse<undefined>) => { |
18 | if (response.ok) { | 18 | if (response.ok) { |
19 | - history.push('/rooms'); | 19 | + history.push({ |
20 | + pathname: '/rooms', | ||
21 | + state: { username: username } | ||
22 | + }); | ||
20 | } else { | 23 | } else { |
21 | console.error('login error!'); // TODO: 팝업 에러? | 24 | console.error('login error!'); // TODO: 팝업 에러? |
22 | } | 25 | } | ... | ... |
-
Please register or login to post a comment