import React from 'react';
import PropTypes from 'prop-types';
import { Redirect } from 'react-router-dom';
import Search from '../container/Search';
import View from '../container/View';
import { userFromMatch } from '../../lib/url';
import WeekSelector from '../container/WeekSelector';
const UserPage = ({ match }) => {
const user = userFromMatch(match);
if (!user) {
// Invalid user, redirect to index.
return