t2-stat-parser/app/webapp/resources/js/Shared/Layout.js

26 lines
542 B
JavaScript
Raw Normal View History

2020-03-29 11:31:16 -04:00
import React, { useEffect } from 'react'
import TopNav from '../Components/TopNav';
import FrameHeading from '../Components/FrameHeading'
2020-04-10 16:32:05 -04:00
export default function Layout({ title, gametype, children }) {
2020-03-29 11:31:16 -04:00
useEffect(() => {
2020-04-12 14:47:23 -04:00
document.title = title + ' - Tribes 2 Stats';
2020-03-29 11:31:16 -04:00
}, [title])
return (
<>
<TopNav />
2020-04-10 16:32:05 -04:00
<FrameHeading heading={title} gametype={gametype} />
2020-03-29 11:31:16 -04:00
<main className="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
<div className="px-4 py-4 sm:px-0">
{ children }
</div>
</main>
</>
)
}