Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
bboa3 committed Dec 7, 2021
1 parent a7ec16d commit acfaa28
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 36 deletions.
4 changes: 0 additions & 4 deletions next-config.js

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"dev": "next dev",
"prestart": "next build",
"start": "next start -p 3001",
"start": "next start",
"migration:deploy": "npx prisma migrate deploy",
"migration:save": "npx prisma migrate dev --name create-tables",
"migration:reset": "npx prisma migrate reset",
Expand Down
4 changes: 1 addition & 3 deletions src/components/AccessoriesCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
} from '../../assets/icons';

interface Props {
images: string[]
images: StaticImageData[]
}

const AccessoriesCarousel: React.FC<Props> = memo(({images}) => {
Expand Down Expand Up @@ -56,8 +56,6 @@ const AccessoriesCarousel: React.FC<Props> = memo(({images}) => {
{
images.map((image, index) => (
<Image
width={600}
height={600}
key={index}
src={image}
alt="Acessórios dos eventos"
Expand Down
4 changes: 0 additions & 4 deletions src/components/History/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ const History: React.FC<Props> = ({
<Wedding>
<div>
<Image
width={3095}
height={4643}
layout="responsive"
src={image1}
alt={image1Alt}
Expand Down Expand Up @@ -61,8 +59,6 @@ const History: React.FC<Props> = ({

<ImageContainer>
<Image
width={6016}
height={4016}
layout="responsive"
src={image2}
alt={image2Alt}
Expand Down
19 changes: 12 additions & 7 deletions src/components/PhotosCarousel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@ const PhotosCarousel: React.FC<Props> = React.memo(({
setActiveSlide(activeSlide-1)
}

const nextSlide = () => {
if(activeSlide === images.length - 1)
return setActiveSlide(0);
setActiveSlide(activeSlide + 1)
function nextSlide(): void {
if (activeSlide === images.length - 1)
return setActiveSlide(0);
setActiveSlide(activeSlide + 1);
}

useEffect(() => {
document.getElementById('slide').style.cssText = null;
images.forEach((_, index) => {
const id = `slide${index}`;
console.log(id);

document.getElementById('slide').style.cssText = null;
})

const timer = setTimeout(nextSlide, animationDelay);
return () => clearTimeout(timer);
Expand All @@ -66,7 +71,7 @@ const PhotosCarousel: React.FC<Props> = React.memo(({
layout="fill"
alt="Matola Ingadi"
key={index}
id="slide active"
id={`slide active`}
src={image}
/>
)
Expand All @@ -76,7 +81,7 @@ const PhotosCarousel: React.FC<Props> = React.memo(({
layout="fill"
alt="Matola Ingadi"
key={index}
id='slide'
id={`slide`}
src={image}
hidden
/>
Expand Down
24 changes: 16 additions & 8 deletions src/pages/acessorios-de-eventos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ import Button from '../components/SubmitButton/styles';

import validator from '../formValidators/accessoriesForm';

import image1 from '../assets/images/mitchell-luo-rNjsDvYUGOw-unsplash.jpg';
import image2 from '../assets/images/eduardo-cano-photo-co-uz3bfBm2ScM-unsplash.jpg';
import image3 from '../assets/images/brayden-gray-RuV_kJNFPiA-unsplash.jpg';
import image4 from '../assets/images/macau-photo-agency-GCPW1-1RtGs-unsplash.jpg';
import image5 from '../assets/images/silviu-beniamin-tofan-peTt3DTUhMQ-unsplash.jpg';
import image6 from '../assets/images/anuvith-premakumar-Iceviap0eGI-unsplash.jpg';
import image7 from '../assets/images/sam-moqadam-ugaOk9LkmQY-unsplash.jpg';

import {
Main,
AccessoriesContainer
Expand Down Expand Up @@ -106,7 +114,7 @@ const Accessories: React.FC = () => {
}}
>
<Form className="form">
<legend>Vejá fotos dos nossos acessórios</legend>
<legend>Veja fotos dos nossos acessórios</legend>
<EventScheduleResponse style={styles}>
{apiResponse}
</EventScheduleResponse>
Expand Down Expand Up @@ -157,13 +165,13 @@ const Accessories: React.FC = () => {
} */}
<AccessoriesCarousel
images={[
'/images/mitchell-luo-rNjsDvYUGOw-unsplash.jpg',
'/images/eduardo-cano-photo-co-uz3bfBm2ScM-unsplash.jpg',
'/images/brayden-gray-RuV_kJNFPiA-unsplash.jpg',
'/images/macau-photo-agency-GCPW1-1RtGs-unsplash.jpg',
'/images/silviu-beniamin-tofan-peTt3DTUhMQ-unsplash.jpg',
'/images/anuvith-premakumar-Iceviap0eGI-unsplash.jpg',
'/images/sam-moqadam-ugaOk9LkmQY-unsplash.jpg',
image1,
image2,
image3,
image4,
image5,
image6,
image7,
]}
/>
</AccessoriesContainer>
Expand Down
16 changes: 10 additions & 6 deletions src/pages/galeria.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import Footer from '../components/Footer';
import PhotosCarousel from '../components/PhotosCarousel';
import { Main } from '../styles/pages/gallery';

import WeddingPoolImg from '../assets/images/casamento-piscina.jpg';
import WeddingNightImg from '../assets/images/casamento-luz-da-noite.jpg';

const Gallery: React.FC = () => {

return (
<div>
<Head>
Expand Down Expand Up @@ -102,24 +106,24 @@ const Gallery: React.FC = () => {

<PhotosCarousel
images={[
'/images/casamento-luz-da-noite.jpg',
'/images/casamento-piscina.jpg'
WeddingNightImg,
WeddingPoolImg
]}
animationDelay={5000}
title={`Nossos Casamentos`}
/>
<PhotosCarousel
images={[
'/images/casamento-luz-da-noite.jpg',
'/images/casamento-piscina.jpg'
WeddingNightImg,
WeddingPoolImg
]}
animationDelay={6000}
title={`Nossos Aniversários`}
/>
<PhotosCarousel
images={[
'/images/casamento-luz-da-noite.jpg',
'/images/casamento-piscina.jpg'
WeddingNightImg,
WeddingPoolImg
]}
animationDelay={7000}
title={`Nossos Eventos Empresariais`}
Expand Down
1 change: 0 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import EventScheduleForm from '../components/EventScheduleForm';
import WeddingImg from '../assets/images/casamento-ingadi.jpg'
import WeddingPoolImg from '../assets/images/casamento-piscina.jpg'
import WeddingNightImg from '../assets/images/casamento-luz-da-noite.jpg'

import image1Img from '../assets/images/ai-vem-o-noivo.png'
import image2Img from '../assets/images/weddings.jpg'

Expand Down
1 change: 0 additions & 1 deletion src/pages/quem-somos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
} from '../styles/pages/quem-somos'

const QuemSomos: React.FC = () => {

return (
<div>
<Head>
Expand Down
3 changes: 2 additions & 1 deletion src/styles/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default createGlobalStyle`
body {
background: var(--color-white);
color: var(--color-primary);
color: var(--color-black);
font-size: 1.8rem;
font-family: 'Crimson Roman', Gentium Plus, sans-serif;
Expand Down Expand Up @@ -62,6 +62,7 @@ input {
:root {
--color-white: #fff;
--color-black: #000;
--color-blue: #15233E;
--color-primary: #232136;
--color-adjust: #603B5A;
Expand Down

1 comment on commit acfaa28

@vercel
Copy link

@vercel vercel bot commented on acfaa28 Dec 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.