revert: revert to yarn to deploy
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { SocialSliderProps } from '@components/pages/home/socialNetworks/SocialSlider'
|
||||
// import { SocialSliderProps } from '@components/pages/home/socialNetworks/SocialSlider'
|
||||
import { Container, Paper } from '@mui/material'
|
||||
import gsap, { Linear } from 'gsap'
|
||||
import ScrollToPlugin from 'gsap/dist/ScrollToPlugin'
|
||||
@@ -7,11 +7,7 @@ import { FC, useEffect, useRef } from 'react'
|
||||
|
||||
gsap.registerPlugin(ScrollTrigger, ScrollToPlugin)
|
||||
|
||||
export interface SocialNetworksProps {
|
||||
socialNetworks: SocialSliderProps['slides']
|
||||
}
|
||||
|
||||
const SocialNetworks: FC<SocialNetworksProps> = () => {
|
||||
const SocialNetworks: FC = () => {
|
||||
const layer01 = useRef<HTMLDivElement| null>(null)
|
||||
const layer02 = useRef<HTMLDivElement| null>(null)
|
||||
const layer03 = useRef<HTMLDivElement| null>(null)
|
||||
@@ -86,9 +82,6 @@ const SocialNetworks: FC<SocialNetworksProps> = () => {
|
||||
component={Container}
|
||||
variant='glass'
|
||||
>
|
||||
{/* <SocialSlider
|
||||
slides={socialNetworks}
|
||||
/> */}
|
||||
</Paper>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faFacebook, faInstagram, faTwitch, faTwitter, faYoutube } from '@fortawesome/free-brands-svg-icons'
|
||||
import { Button, Typography } from '@mui/material'
|
||||
import { Navigation, Pagination, A11y } from 'swiper'
|
||||
import { Swiper, SwiperSlide } from 'swiper/react'
|
||||
|
||||
import 'swiper/css'
|
||||
import 'swiper/css/navigation'
|
||||
import 'swiper/css/pagination'
|
||||
import { FC } from 'react'
|
||||
import { Button as ButtonType } from '@interfaces'
|
||||
|
||||
export interface SlideProps {
|
||||
socialNetwork: 'facebook' | 'twitter' | 'instagram' | 'youtube' | 'twitch'
|
||||
description: string
|
||||
links: ButtonType[]
|
||||
}
|
||||
|
||||
const Slide:FC<SlideProps> = ({ description, socialNetwork, links }) => {
|
||||
return (
|
||||
<div
|
||||
css={{
|
||||
marginInline: '36px',
|
||||
marginBlock: '16px',
|
||||
padding: '16px'
|
||||
}}
|
||||
>
|
||||
<Typography variant="body1" component="div" align="center" >
|
||||
{{
|
||||
facebook: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faFacebook} size="5x" fixedWidth />,
|
||||
twitter: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faTwitter} size="5x" fixedWidth />,
|
||||
instagram: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faInstagram} size="5x" fixedWidth />,
|
||||
youtube: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faYoutube} size="5x" fixedWidth />,
|
||||
twitch: <FontAwesomeIcon style={{ filter: 'drop-shadow(2px 2px 2px rgb(0 0 0 / 0.4)' }}icon={faTwitch} size="5x" fixedWidth />
|
||||
}[socialNetwork]}
|
||||
</Typography>
|
||||
<Typography variant="body1" align="center" >
|
||||
{description}
|
||||
</Typography>
|
||||
<div
|
||||
css={{
|
||||
display: 'flex',
|
||||
justifyContent: 'space-around',
|
||||
alignItems: 'center',
|
||||
marginBlock: '1rem'
|
||||
}}
|
||||
>
|
||||
{links.map(({ url, label, color, variant }) => (
|
||||
<Button
|
||||
key={url}
|
||||
href={url}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
variant={variant}
|
||||
color={color}
|
||||
>
|
||||
{label}
|
||||
</Button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export interface SocialSliderProps {
|
||||
slides: SlideProps[]
|
||||
}
|
||||
|
||||
const SocialSlider: FC<SocialSliderProps> = ({ slides }) => {
|
||||
return (
|
||||
<Swiper
|
||||
modules={[Navigation, Pagination, A11y]}
|
||||
spaceBetween={16}
|
||||
slidesPerView={1}
|
||||
navigation
|
||||
pagination={{ clickable: true }}
|
||||
scrollbar={{ draggable: true }}
|
||||
>
|
||||
{slides.map(({ socialNetwork, description, links }) => (
|
||||
|
||||
<SwiperSlide
|
||||
key={socialNetwork}
|
||||
>
|
||||
<Slide
|
||||
socialNetwork={socialNetwork}
|
||||
description={description}
|
||||
links={links}
|
||||
/>
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
)
|
||||
}
|
||||
|
||||
export default SocialSlider
|
||||
@@ -1,46 +0,0 @@
|
||||
import fetch from 'isomorphic-fetch'
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
import nextConnect from 'next-connect'
|
||||
|
||||
const handler = nextConnect<NextApiRequest, NextApiResponse>({
|
||||
onError: (error, req, res) => {
|
||||
res.status(501).json({ error: `Sorry something Happened! ${error.message}` })
|
||||
},
|
||||
onNoMatch: (req, res) => {
|
||||
res.status(405).json({ error: `Method '${req.method}' Not Allowed` })
|
||||
}
|
||||
})
|
||||
|
||||
handler.post(
|
||||
async (req, res) => {
|
||||
const bodyToSend = JSON.stringify({
|
||||
content: 'Nueva solicitud de unirse a equipo',
|
||||
embeds: [
|
||||
{
|
||||
title: 'Solicitud de unirse a equipo',
|
||||
color: 3782986,
|
||||
fields: Object.entries(req.body).map(([key, value]) => ({
|
||||
name: key,
|
||||
value,
|
||||
inline: false
|
||||
})),
|
||||
timestamp: new Date().toISOString()
|
||||
}
|
||||
]
|
||||
})
|
||||
const response = await fetch(process.env.DISCORD_JOIN_WEBHOOK_URL || '', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: bodyToSend
|
||||
})
|
||||
if (response.ok) {
|
||||
res.status(200).json({ message: 'Form sent' })
|
||||
} else {
|
||||
res.status(500).json({ message: 'Something went wrong' })
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
export default handler
|
||||
@@ -1,11 +1,8 @@
|
||||
import { GetStaticProps, GetStaticPropsResult, InferGetStaticPropsType } from 'next'
|
||||
import { Paper, Tab, Tabs, Theme, Typography, useMediaQuery } from '@mui/material'
|
||||
import { FC, useEffect, useState } from 'react'
|
||||
import { Swiper as SwiperClass, Virtual } from 'swiper'
|
||||
import { Swiper, SwiperSlide } from 'swiper/react'
|
||||
import { GetStaticProps, GetStaticPropsResult, InferGetStaticPropsType } from 'next'
|
||||
import { FC, useState } from 'react'
|
||||
|
||||
import Contained from '@components/layouts/Contained'
|
||||
import PositionJoinTeam from '@components/pages/equipo/unirse/PositionJoinTeam'
|
||||
import Seo from '@components/Seo'
|
||||
import { EquipoUnirsePageProps } from '@interfaces'
|
||||
|
||||
@@ -98,16 +95,9 @@ export const getStaticProps: GetStaticProps<EquipoUnirsePageProps> = async (): P
|
||||
|
||||
const Unirse: FC<InferGetStaticPropsType<typeof getStaticProps>> = ({ title, seo, description, teamPositions }) => {
|
||||
const [currentTab, setCurrentTab] = useState(0)
|
||||
const [currenSwiper, setCurrenSwiper] = useState<SwiperClass | undefined>(undefined)
|
||||
|
||||
const isMediumOrBigger = useMediaQuery((theme: Theme) => theme.breakpoints.up('md'))
|
||||
|
||||
useEffect(() => {
|
||||
if (currenSwiper) {
|
||||
currenSwiper.slideToLoop(currentTab)
|
||||
}
|
||||
}, [currentTab])
|
||||
|
||||
return (
|
||||
<Contained>
|
||||
<Seo {...seo} />
|
||||
@@ -136,20 +126,7 @@ const Unirse: FC<InferGetStaticPropsType<typeof getStaticProps>> = ({ title, seo
|
||||
))}
|
||||
</Tabs>
|
||||
</Paper>
|
||||
<Swiper
|
||||
spaceBetween={50}
|
||||
modules={[Virtual]}
|
||||
allowTouchMove={false}
|
||||
onSwiper={(swiper) => { setCurrenSwiper(swiper) }}
|
||||
onSlideChange={(swiper) => { setCurrentTab(swiper.activeIndex) }}
|
||||
virtual
|
||||
>
|
||||
{teamPositions.map((position, index) => (
|
||||
<SwiperSlide key={index} >
|
||||
<PositionJoinTeam {...position} />
|
||||
</SwiperSlide>
|
||||
))}
|
||||
</Swiper>
|
||||
|
||||
</Contained>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import Footer from '@components/layouts/Footer'
|
||||
import Header from '@components/layouts/Header'
|
||||
import Clanes from '@components/pages/home/Clanes'
|
||||
import Hero from '@components/pages/home/Hero'
|
||||
import SocialNetworks from '@components/pages/home/SocialNetworks'
|
||||
import Team from '@components/pages/home/Team'
|
||||
|
||||
const Home: NextPage = () => {
|
||||
@@ -25,40 +24,6 @@ const Home: NextPage = () => {
|
||||
title='Clanes'
|
||||
description='Los clanes son espacios donde compartir nuestros gustos con otros usuarios, dándonos la oportunidad de organizar proyectos y eventos en los cuales formar parte.'
|
||||
/>
|
||||
<SocialNetworks
|
||||
socialNetworks={[
|
||||
{
|
||||
socialNetwork: 'facebook',
|
||||
description: 'Puedes seguirnos en Facebook para ver memes sobre videojuegos, información sobre los Clanes, la comunidad, eventos, etc. o formar parte del grupo para interactuar mas de cerca con otros integrantes de la comunidad',
|
||||
links: [
|
||||
{
|
||||
label: 'Pagina de Facebook',
|
||||
url: 'https://www.facebook.com/EntGamers/',
|
||||
variant: 'contained',
|
||||
color: 'primary'
|
||||
},
|
||||
{
|
||||
label: 'Grupo de Facebook',
|
||||
url: 'https://www.facebook.com/groups/EntGamers/',
|
||||
variant: 'contained',
|
||||
color: 'primary'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
socialNetwork: 'twitter',
|
||||
description: 'Puedes seguirnos en Twitter para enterarte de las noticias mas recientes sobre la comunidad, eventos y demás información.',
|
||||
links: [
|
||||
{
|
||||
label: 'Twitter',
|
||||
url: 'https://twitter.com/EntGamers',
|
||||
variant: 'contained',
|
||||
color: 'primary'
|
||||
}
|
||||
]
|
||||
}
|
||||
]}
|
||||
/>
|
||||
<Team
|
||||
title='Equipo'
|
||||
teamMembers={[
|
||||
|
||||
Reference in New Issue
Block a user