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 users from '../../users';
const App = ({ match }) => {
const user = `${match.params.type}/${match.params.value}`;
if (!users.allIds.includes(user)) {
// Invalid user, redirect to index.
return