componentDidMount() {
    // Set user value in local storage
    if (typeof window !== 'undefined' && window.localStorage) {
      localStorage.setItem('TMLAthleteId', this.props.id);
    }

    this.fetchAthlete();
  }
// Only need this client-side
Only need this client-side
Only need this client - side
componentDidMount() {
    if (typeof window !== 'undefined' && window.localStorage) {
      localStorage.setItem('TMLAthleteId', this.props.id);
    }
    this.fetchAthlete();
  }
componentDidMount ( ) { if ( typeof window !== 'undefined' && window . localStorage ) { localStorage . setItem ( 'TMLAthleteId' , this . props . id ) ; } this . fetchAthlete ( ) ; }
Only need this client-side
Only need this client - side
// Set user value in local storage