Migrate to yarn berry and fix all workspace errors
This commit is contained in:
33
frontend/components/Footer.js
Normal file
33
frontend/components/Footer.js
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Box, Typography, Link } from '@mui/material'
|
||||
import { Component } from 'react'
|
||||
|
||||
export default class Footer extends Component {
|
||||
render () {
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
p: 12
|
||||
}}
|
||||
>
|
||||
All data is collected from the
|
||||
<Link
|
||||
href='https://warframe.market/api_docs'
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Warframe Market API
|
||||
</Link>
|
||||
|
||||
<Typography variant='h6'>DISCLAIMER</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
fontSize: 12,
|
||||
lineHeight: 'normal'
|
||||
}}
|
||||
>
|
||||
Digital Extremes Ltd, Warframe and the logo Warframe are registered trademarks. All rights are reserved worldwide. This site has no official link with Digital Extremes Ltd or Warframe. All artwork, screenshots, characters or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of Digital Extremes Ltd.
|
||||
</Box>
|
||||
</Box>
|
||||
)
|
||||
}
|
||||
}
|
||||
37
frontend/components/WithYandexMetrika.js
Normal file
37
frontend/components/WithYandexMetrika.js
Normal file
@@ -0,0 +1,37 @@
|
||||
import Router from 'next/router'
|
||||
import React, { useCallback, useEffect } from 'react'
|
||||
import ym, { YMInitializer } from 'react-yandex-metrika'
|
||||
|
||||
const WithYandexMetrika = (props) => {
|
||||
const { children } = props
|
||||
|
||||
const enabled = process.env.NODE_ENV !== 'development'
|
||||
|
||||
const hit = useCallback((url) => {
|
||||
if (enabled) {
|
||||
ym('hit', url)
|
||||
} else {
|
||||
console.log('%c[YandexMetrika](HIT)', 'color: orange', url)
|
||||
}
|
||||
}, [enabled])
|
||||
|
||||
useEffect(() => {
|
||||
hit(window.location.pathname + window.location.search)
|
||||
Router.events.on('routeChangeComplete', hit)
|
||||
}, [hit])
|
||||
|
||||
return (
|
||||
<>
|
||||
{enabled && (
|
||||
<YMInitializer
|
||||
accounts={[87671663]}
|
||||
options={{ webvisor: true, defer: true }}
|
||||
version='2'
|
||||
/>
|
||||
)}
|
||||
{children}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
export default WithYandexMetrika
|
||||
16
frontend/components/layout.js
Normal file
16
frontend/components/layout.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import Head from 'next/head'
|
||||
|
||||
import Footer from './Footer'
|
||||
|
||||
export default function Layout ({ children }) {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>Warframe Center</title>
|
||||
<link rel='icon' href='/favicon.ico' />
|
||||
</Head>
|
||||
<main>{children}</main>
|
||||
<Footer />
|
||||
</>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user