text: import React, { useState, createContext } from 'react';
  import PropTypes from 'prop-types';
  
  
  const UserContext = createContext(['']);
  
  export const UserProvider = ({ children }) => {
    const [user, setUser] = useState('');
  
    return (
      <UserContext.Provider value={[user, setUser]}>
        {children}
      </UserContext.Provider>
    );
  };
  
  UserProvider.propTypes = {
    children: PropTypes.oneOfType([
      PropTypes.arrayOf(PropTypes.node),
      PropTypes.node,
    ]).isRequired,
  };
  
  export default UserContext;
  