feat: eslint update
This commit is contained in:
@@ -1,32 +1,32 @@
|
||||
import Head from 'next/head'
|
||||
import { FC } from 'react'
|
||||
import { type FC } from 'react'
|
||||
|
||||
export type SeoProps = {
|
||||
export interface SeoProps {
|
||||
title?: string
|
||||
description?: string
|
||||
image?: string
|
||||
}
|
||||
|
||||
const SITE_NAME = process.env.SITE_NAME || 'EntGamers'
|
||||
const SITE_NAME = process.env.SITE_NAME ?? 'EntGamers'
|
||||
|
||||
const Seo: FC<SeoProps> = ({ title, description, image }) => {
|
||||
return (
|
||||
<Head>
|
||||
{!!title && (
|
||||
{title !== undefined && (
|
||||
<>
|
||||
<title key="title">{`${title} - ${SITE_NAME}`}</title>
|
||||
<meta key="og_title" property="og:title" content={title} />
|
||||
<meta key="twitter_title" property="twitter:title" content={title} />
|
||||
</>
|
||||
)}
|
||||
{!!description && (
|
||||
{description !== undefined && (
|
||||
<>
|
||||
<meta key="description" name="description" content={description} />
|
||||
<meta key="og_description" property="og:description" content={description} />
|
||||
<meta key="twitter_description" property="twitter:description" content={description} />
|
||||
</>
|
||||
)}
|
||||
{!!image && (
|
||||
{image !== undefined && (
|
||||
<>
|
||||
<meta key="og_image" property="og:image" content={image} />
|
||||
<meta key="twitter_image" property="twitter:image" content={image} />
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { Container } from '@mui/material'
|
||||
import { FC } from 'react'
|
||||
import { type FC } from 'react'
|
||||
|
||||
import Header from '@components/layouts/Header'
|
||||
import Footer from '@components/layouts/Footer'
|
||||
|
||||
import { ContainedProps } from '@interfaces'
|
||||
import { type ContainedProps } from '@interfaces'
|
||||
|
||||
const Contained: FC<ContainedProps> = ({ children }) => {
|
||||
return (
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { faAngleRight } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { type FooterColumn } from '@interfaces'
|
||||
import { Container, Paper, Typography } from '@mui/material'
|
||||
import MuiLink from '@mui/material/Link'
|
||||
import NextLink from 'next/link'
|
||||
import { type FC } from 'react'
|
||||
|
||||
import { faAngleRight } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { FooterColumn } from '@interfaces'
|
||||
|
||||
const Footer = () => {
|
||||
const Footer: FC = () => {
|
||||
const columns: FooterColumn[] = [
|
||||
{
|
||||
title: 'Acerca de',
|
||||
|
||||
@@ -1,31 +1,29 @@
|
||||
import EntGamers from '@assets/logos/EntGamers'
|
||||
import { faBars } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { type Link } from '@interfaces'
|
||||
import { AppBar, Box, Container, Divider, IconButton, ListItemButton, NoSsr } from '@mui/material'
|
||||
import dynamic from 'next/dynamic'
|
||||
import NextLink from 'next/link'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useEffect, useState, type FC } from 'react'
|
||||
|
||||
import EntGamers from '@assets/logos/EntGamers'
|
||||
|
||||
import { Link } from '@interfaces'
|
||||
|
||||
const Drawer = dynamic(() => import('@mui/material/Drawer'), { ssr: false })
|
||||
const List = dynamic(() => import('@mui/material/List'), { ssr: false })
|
||||
const ListItemText = dynamic(() => import('@mui/material/ListItemText'), { ssr: false })
|
||||
const Drawer = dynamic(async () => await import('@mui/material/Drawer'), { ssr: false })
|
||||
const List = dynamic(async () => await import('@mui/material/List'), { ssr: false })
|
||||
const ListItemText = dynamic(async () => await import('@mui/material/ListItemText'), { ssr: false })
|
||||
|
||||
const MenuItems: Link[] = [
|
||||
{ label: 'Home', url: '/' },
|
||||
{ label: 'Clanes', url: '/clanes' }
|
||||
]
|
||||
|
||||
const Header = () => {
|
||||
const Header: FC = () => {
|
||||
const [scrolled, setScrolled] = useState(false)
|
||||
const [openMenu, setOpenMenu] = useState(false)
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
const handleScroll = () => {
|
||||
const handleScroll = (): void => {
|
||||
if (window.scrollY > 15) {
|
||||
setScrolled(true)
|
||||
} else {
|
||||
@@ -86,7 +84,7 @@ const Header = () => {
|
||||
alignItems: 'center',
|
||||
aspectRatio: '1'
|
||||
}}
|
||||
onClick={() => setOpenMenu(true)}
|
||||
onClick={() => { setOpenMenu(true) }}
|
||||
>
|
||||
<FontAwesomeIcon icon={faBars} size="xs" />
|
||||
</IconButton>
|
||||
@@ -96,7 +94,7 @@ const Header = () => {
|
||||
<NoSsr>
|
||||
<Drawer
|
||||
open={openMenu}
|
||||
onClose={() => setOpenMenu(false)}
|
||||
onClose={() => { setOpenMenu(false) }}
|
||||
anchor="right"
|
||||
>
|
||||
<Box
|
||||
|
||||
@@ -2,16 +2,16 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight'
|
||||
import { Box, NoSsr, Typography } from '@mui/material'
|
||||
import dynamic from 'next/dynamic'
|
||||
import { FC } from 'react'
|
||||
import { type FC } from 'react'
|
||||
|
||||
import { PositionJoinTeamProps } from '@interfaces'
|
||||
import { type PositionJoinTeamProps } from '@interfaces'
|
||||
|
||||
const UnirseForm = dynamic(() => import('@components/pages/equipo/unirse/UnirseForm'), {
|
||||
const UnirseForm = dynamic(async () => await import('@components/pages/equipo/unirse/UnirseForm'), {
|
||||
ssr: false,
|
||||
suspense: false
|
||||
})
|
||||
|
||||
const PositionJoinTeam:FC<PositionJoinTeamProps> = (
|
||||
const PositionJoinTeam: FC<PositionJoinTeamProps> = (
|
||||
{ benefits, description, requirements, title }
|
||||
) => {
|
||||
return (
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { useFormik } from 'formik'
|
||||
import { Box, Button, TextField, Typography } from '@mui/material'
|
||||
import { FC, useState } from 'react'
|
||||
import { useFormik } from 'formik'
|
||||
import { useState, type FC } from 'react'
|
||||
import { object, string } from 'yup'
|
||||
|
||||
import { UnirseFormData, UnirseFormProps } from '@interfaces'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faSpinner } from '@fortawesome/free-solid-svg-icons'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { type UnirseFormData, type UnirseFormProps } from '@interfaces'
|
||||
|
||||
const unirseFormSchema = object({
|
||||
name: string().required('El nombre es requerido'),
|
||||
@@ -21,7 +21,7 @@ const UnirseForm: FC<UnirseFormProps> = ({ role }) => {
|
||||
initialValues: {
|
||||
name: '',
|
||||
email: '',
|
||||
role: role || '',
|
||||
role: role ?? '',
|
||||
discordUserName: '',
|
||||
experience: ''
|
||||
},
|
||||
@@ -73,8 +73,8 @@ const UnirseForm: FC<UnirseFormProps> = ({ role }) => {
|
||||
placeholder="Escribe tu nombre"
|
||||
value={formik.values.name}
|
||||
onChange={formik.handleChange}
|
||||
error={formik.touched.name && !!formik.errors.name}
|
||||
helperText={formik.touched.name && formik.errors.name}
|
||||
error={formik.touched.name !== undefined && formik.errors.name !== undefined }
|
||||
helperText={formik.touched.name !== undefined && formik.errors.name}
|
||||
fullWidth
|
||||
margin="normal"
|
||||
/>
|
||||
@@ -84,8 +84,8 @@ const UnirseForm: FC<UnirseFormProps> = ({ role }) => {
|
||||
placeholder="Usaremos este correo para contactarte"
|
||||
value={formik.values.email}
|
||||
onChange={formik.handleChange}
|
||||
error={formik.touched.email && !!formik.errors.email}
|
||||
helperText={formik.touched.email && formik.errors.email}
|
||||
error={formik.touched.email !== undefined && formik.errors.email !== undefined }
|
||||
helperText={formik.touched.email !== undefined && formik.errors.email}
|
||||
fullWidth
|
||||
margin="normal"
|
||||
/>
|
||||
@@ -95,8 +95,8 @@ const UnirseForm: FC<UnirseFormProps> = ({ role }) => {
|
||||
placeholder="userName#0000"
|
||||
value={formik.values.discordUserName}
|
||||
onChange={formik.handleChange}
|
||||
error={formik.touched.discordUserName && !!formik.errors.discordUserName}
|
||||
helperText={formik.touched.discordUserName && formik.errors.discordUserName}
|
||||
error={formik.touched.discordUserName !== undefined && formik.errors.discordUserName !== undefined }
|
||||
helperText={formik.touched.discordUserName !== undefined && formik.errors.discordUserName}
|
||||
fullWidth
|
||||
margin="normal"
|
||||
/>
|
||||
@@ -106,8 +106,8 @@ const UnirseForm: FC<UnirseFormProps> = ({ role }) => {
|
||||
placeholder="¿Tienes experiencia en el área? ¿Qué conocimientos tienes?"
|
||||
value={formik.values.experience}
|
||||
onChange={formik.handleChange}
|
||||
error={formik.touched.experience && !!formik.errors.experience}
|
||||
helperText={formik.touched.experience && formik.errors.experience}
|
||||
error={formik.touched.experience !== undefined && formik.errors.experience !== undefined }
|
||||
helperText={formik.touched.experience !== undefined && formik.errors.experience}
|
||||
fullWidth
|
||||
margin="normal"
|
||||
multiline
|
||||
@@ -124,7 +124,7 @@ const UnirseForm: FC<UnirseFormProps> = ({ role }) => {
|
||||
type="submit"
|
||||
endIcon={formik.isSubmitting ? <FontAwesomeIcon icon={faSpinner} spin /> : undefined}
|
||||
>
|
||||
Enviar
|
||||
Enviar
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Box, Button, Container, Paper, Typography } from '@mui/material'
|
||||
import Image from 'next/image'
|
||||
import Link from 'next/link'
|
||||
import { FC } from 'react'
|
||||
import { type FC } from 'react'
|
||||
|
||||
import ClanesImage from '@assets/images/Clanes.png'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import gsap, { Elastic, Linear } from 'gsap'
|
||||
import ScrollTrigger from 'gsap/dist/ScrollTrigger'
|
||||
import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
|
||||
import Image from 'next/image'
|
||||
import { FC, useEffect, useRef } from 'react'
|
||||
import { type FC, useEffect, useRef } from 'react'
|
||||
|
||||
import EntGamers from '@assets/images/EntGamers.png'
|
||||
|
||||
@@ -17,13 +17,13 @@ export interface HeroProps {
|
||||
}
|
||||
|
||||
const Hero: FC<HeroProps> = ({ subtitle, title }) => {
|
||||
const layer01 = useRef<HTMLDivElement| null>(null)
|
||||
const layer02 = useRef<HTMLDivElement| null>(null)
|
||||
const layer03 = useRef<HTMLDivElement| null>(null)
|
||||
const layer04 = useRef<HTMLDivElement| null>(null)
|
||||
const layer05 = useRef<HTMLDivElement| null>(null)
|
||||
const layer06 = useRef<HTMLDivElement| null>(null)
|
||||
const verMasButton = useRef<HTMLButtonElement| null>(null)
|
||||
const layer01 = useRef<HTMLDivElement | null>(null)
|
||||
const layer02 = useRef<HTMLDivElement | null>(null)
|
||||
const layer03 = useRef<HTMLDivElement | null>(null)
|
||||
const layer04 = useRef<HTMLDivElement | null>(null)
|
||||
const layer05 = useRef<HTMLDivElement | null>(null)
|
||||
const layer06 = useRef<HTMLDivElement | null>(null)
|
||||
const verMasButton = useRef<HTMLButtonElement | null>(null)
|
||||
useEffect(() => {
|
||||
const scrollTrigger = {
|
||||
trigger: layer01.current,
|
||||
|
||||
@@ -3,15 +3,15 @@ import { Container, Paper } from '@mui/material'
|
||||
import gsap, { Linear } from 'gsap'
|
||||
import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
|
||||
import ScrollTrigger from 'gsap/dist/ScrollTrigger'
|
||||
import { FC, useEffect, useRef } from 'react'
|
||||
import { type FC, useEffect, useRef } from 'react'
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger, ScrollToPlugin)
|
||||
|
||||
const SocialNetworks: FC = () => {
|
||||
const layer01 = useRef<HTMLDivElement| null>(null)
|
||||
const layer02 = useRef<HTMLDivElement| null>(null)
|
||||
const layer03 = useRef<HTMLDivElement| null>(null)
|
||||
const layer04 = useRef<HTMLDivElement| null>(null)
|
||||
const layer01 = useRef<HTMLDivElement | null>(null)
|
||||
const layer02 = useRef<HTMLDivElement | null>(null)
|
||||
const layer03 = useRef<HTMLDivElement | null>(null)
|
||||
const layer04 = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
useEffect(() => {
|
||||
const scrollTrigger = {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Button, Container, Typography } from '@mui/material'
|
||||
import NextLink from 'next/link'
|
||||
import { FC } from 'react'
|
||||
import { type FC } from 'react'
|
||||
|
||||
import ProfileCard, { ProfileCardProps } from '@components/profiles/ProfileCard'
|
||||
import ProfileCard, { type ProfileCardProps } from '@components/profiles/ProfileCard'
|
||||
|
||||
export interface TeamProps {
|
||||
title: string
|
||||
|
||||
@@ -2,21 +2,21 @@ import { faFacebook, faInstagram, faTiktok, faTwitch, faTwitter, faYoutube } fro
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { Avatar, Card, CardContent, IconButton, Tooltip, Typography } from '@mui/material'
|
||||
import NextImage from 'next/image'
|
||||
import { FC } from 'react'
|
||||
import { type FC } from 'react'
|
||||
|
||||
import BadgeBook from '@assets/images/gaming/BadgeBook.png'
|
||||
import BadgeShield from '@assets/images/gaming/BadgeShield.png'
|
||||
import BadgeSword from '@assets/images/gaming/BadgeSword.png'
|
||||
import ButtonA from '@assets/images/gaming/ButtonA.png'
|
||||
import { faGlobe } from '@fortawesome/free-solid-svg-icons'
|
||||
import { SocialLink } from '@interfaces'
|
||||
import { type SocialLink } from '@interfaces'
|
||||
|
||||
export interface ProfileCardProps {
|
||||
userName: string
|
||||
biography: string
|
||||
avatar: string
|
||||
socialNetworks: SocialLink[]
|
||||
role: 'user'| 'moderator'| 'collaborator' | 'admin'
|
||||
role: 'user' | 'moderator' | 'collaborator' | 'admin'
|
||||
}
|
||||
|
||||
const ProfileCard: FC<ProfileCardProps> = ({ avatar, biography, socialNetworks, userName, role }) => {
|
||||
@@ -136,20 +136,20 @@ const ProfileCard: FC<ProfileCardProps> = ({ avatar, biography, socialNetworks,
|
||||
>
|
||||
{((socialNetwork) => {
|
||||
switch (socialNetwork) {
|
||||
case 'facebook':
|
||||
return <FontAwesomeIcon icon={faFacebook} size="xs" />
|
||||
case 'twitter':
|
||||
return <FontAwesomeIcon icon={faTwitter} size="xs" />
|
||||
case 'instagram':
|
||||
return <FontAwesomeIcon icon={faInstagram} size="xs" />
|
||||
case 'twitch':
|
||||
return <FontAwesomeIcon icon={faTwitch} size="xs" />
|
||||
case 'youtube':
|
||||
return <FontAwesomeIcon icon={faYoutube} size="xs" />
|
||||
case 'tiktok':
|
||||
return <FontAwesomeIcon icon={faTiktok} size="xs" />
|
||||
default:
|
||||
return <FontAwesomeIcon icon={faGlobe} size="xs" />
|
||||
case 'facebook':
|
||||
return <FontAwesomeIcon icon={faFacebook} size="xs" />
|
||||
case 'twitter':
|
||||
return <FontAwesomeIcon icon={faTwitter} size="xs" />
|
||||
case 'instagram':
|
||||
return <FontAwesomeIcon icon={faInstagram} size="xs" />
|
||||
case 'twitch':
|
||||
return <FontAwesomeIcon icon={faTwitch} size="xs" />
|
||||
case 'youtube':
|
||||
return <FontAwesomeIcon icon={faYoutube} size="xs" />
|
||||
case 'tiktok':
|
||||
return <FontAwesomeIcon icon={faTiktok} size="xs" />
|
||||
default:
|
||||
return <FontAwesomeIcon icon={faGlobe} size="xs" />
|
||||
}
|
||||
})(socialNetwork)}
|
||||
</IconButton>
|
||||
|
||||
Reference in New Issue
Block a user