import React from "react" ; import NotFound from "./NotFound" ; type Props = { url : string ; error ? : Error ; } ; const FetchError = ( { url , error } ) => { const pathArray = url . split ( "/" ) ; const keyword = pathArray [ pathArray . length - 1 ] ; return ( < > { } < NotFound keyword = { keyword } / > { } < />); } ; export default FetchError ;