28 lines
686 B
TypeScript
Raw Normal View History

2020-12-29 19:39:30 +00:00
import React from 'react';
import {Route, Switch, useRouteMatch} from 'react-router-dom';
2020-12-29 19:39:30 +00:00
import {CategoryViewWR} from './CategoryView';
import TagView from './TagView';
/**
* Component for Category Page
* Contains a Tag Overview and loads specific Tag videos in VideoContainer
*/
const CategoryPage = (): JSX.Element => {
const match = useRouteMatch();
console.log(match.url);
return (
<Switch>
<Route exact path={`${match.url}/:id`}>
<CategoryViewWR />
</Route>
<Route exact path={`${match.url}/`}>
<TagView />
</Route>
</Switch>
);
};
2020-12-29 19:39:30 +00:00
export default CategoryPage;