I have a react project where I have a library of Banners, I am using react router 4 to navigate between the different clients, years, and campaigns
<BrowserRouter>
<div>
<Switch>
<Route path="/:client/:year/:campaign/:banner" exact component={bannerPage} />
<Route path="/:client/:year/:campaign" exact component={campaignPage} />
<Route path="/:client/:year" exact component={campaignIndex} />
<Route path="/" exact component={clientIndex} />
</Switch>
</div>
</BrowserRouter>
on the component that displays the specific banner I have an i-frame to render the actual banner and nothing else
render() {
return(
<div>
<iframe src='data/client/year/campaign/banner'
width="300px"
height="250px"
display="initial" >
</iframe>
</div>
)
}
but when I tried to render the banner, React Router intercepts the src of the iframe and displays the index.html page again with no components since the path didn't match any route
any help would be appreciated! thanks!