Skip to content
Snippets Groups Projects
Select Git revision
  • e32ba137f1c84bc9b30e43f930c9b8b5258d1c03
  • master default protected
  • schwifi
  • eckbalu-master-patch-41181
  • halof
  • our-team
  • 0.12.9 protected
  • 0.12.8 protected
  • 0.12.7 protected
  • 0.12.6 protected
  • 0.12.5 protected
  • 0.12.4 protected
  • 0.12.3 protected
  • 0.12.2 protected
  • 0.12.1 protected
  • 0.12.0 protected
  • 0.11.5 protected
  • 0.11.4 protected
  • 0.11.3 protected
  • 0.11.2 protected
  • 0.11.1 protected
  • 0.11.0 protected
  • 0.10.6 protected
  • 0.10.5 protected
  • 0.10.4 protected
  • 0.10.3 protected
26 results

README.md

Blame
  • RememberMe.tsx 468 B
    import React, { useEffect } from 'react';
    import useMe from '../hooks/useMe';
    import { useUserContext } from '../hooks/useUserContext';
    
    interface Props {}
    
    const RememberMe: React.FC = ({ children }) => {
      const { setProfile } = useUserContext();
      const { data: me } = useMe();
    
      useEffect(() => {
        if (me) {
          setProfile(me);
        } else {
          setProfile(undefined);
        }
      }, [me, setProfile]);
    
      return <>{children}</>;
    };
    
    export default RememberMe;