import * as React from "react" ; import { Redirect } from "react-router" ; import Board from "./Board" ; type Props = { match : { params : { boardId : string ; } ; } ; } ; function BoardContainer ( { match } ) { const { boardId } = match . params ; return boardId ? < Board boardId = { boardId } /> : <Redirect to="/ "/>; } export default BoardContainer ;