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

26 lines
542 B
JavaScript
Raw Normal View History

2020-03-29 15:31:16 +00:00
import React, { useEffect } from 'react'
import TopNav from '../Components/TopNav';
import FrameHeading from '../Components/FrameHeading'
2020-04-10 20:32:05 +00:00
export default function Layout({ title, gametype, children }) {
2020-03-29 15:31:16 +00:00
useEffect(() => {
2020-04-12 18:47:23 +00:00
document.title = title + ' - Tribes 2 Stats';
2020-03-29 15:31:16 +00:00
}, [title])
return (
<>
<TopNav />
2020-04-10 20:32:05 +00:00
<FrameHeading heading={title} gametype={gametype} />
2020-03-29 15:31:16 +00: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>
</>
)
}