// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: MIT-0 import React, { useState, createRef, useEffect } from 'react'; import PropTypes from 'prop-types'; const SignIn = ({ updateUsername }) => { const [username, setUsername] = useState(''); const inputRef = createRef(); useEffect(() => { inputRef.current.focus(); }, [inputRef]); return (

Enter your name

setUsername(e.target.value)} />
); } SignIn.propTypes = { updateUsername: PropTypes.func, }; export default SignIn;