Refactor app state to be a state machine with access selectors
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import { ConnectedClientInfoEvent } from '../../../interfaces/socket-events';
|
||||
|
||||
export default function handleConnectedClientInfoMessage(
|
||||
message: ConnectedClientInfoEvent,
|
||||
setChatDisplayName: (string) => void,
|
||||
) {
|
||||
console.log('connected client', message);
|
||||
const { user } = message;
|
||||
const { displayName } = user;
|
||||
setChatDisplayName(displayName);
|
||||
}
|
||||
Reference in New Issue
Block a user