Migrate to yarn berry and fix all workspace errors

This commit is contained in:
2022-07-07 01:12:21 +03:00
parent 78fd1b5adf
commit 862cbd3af1
41 changed files with 5878 additions and 8452 deletions

View 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&nbsp;
<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>
)
}
}

View 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

View 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 />
</>
)
}