# Replace hotkey scopes by focus stack (Part 4 - Inputs) This PR is the 4th part of a refactoring aiming to deprecate the hotkey scopes api in favor of the new focus stack api which is more robust. Part 1: https://github.com/twentyhq/twenty/pull/12673 Part 2: https://github.com/twentyhq/twenty/pull/12798 Part 3: https://github.com/twentyhq/twenty/pull/12910 In this part, I refactored all inputs in the app so that each input has a unique id which can be used to track the focused element.
19 lines
457 B
TypeScript
19 lines
457 B
TypeScript
import { useRecoilValue } from 'recoil';
|
|
|
|
import { currentUserState } from '@/auth/states/currentUserState';
|
|
import { TextInput } from '@/ui/input/components/TextInput';
|
|
|
|
export const EmailField = () => {
|
|
const currentUser = useRecoilValue(currentUserState);
|
|
|
|
return (
|
|
<TextInput
|
|
instanceId={`user-email-${currentUser?.id}`}
|
|
value={currentUser?.email}
|
|
disabled
|
|
fullWidth
|
|
key={'email-' + currentUser?.id}
|
|
/>
|
|
);
|
|
};
|