diff --git a/src/components/Account/UserAvatar.tsx b/src/components/Account/UserAvatar.tsx index 385082d..f1c54bd 100644 --- a/src/components/Account/UserAvatar.tsx +++ b/src/components/Account/UserAvatar.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import Image from 'next/image'; +import { CldImage } from 'next-cloudinary'; import { z } from 'zod'; import GetUserSchema from '@/services/User/schema/GetUserSchema'; import { FaUser } from 'react-icons/fa'; @@ -25,11 +25,12 @@ const UserAvatar: FC = ({ user }) => { ) : ( - user avatar ); diff --git a/src/components/BeerIndex/BeerCard.tsx b/src/components/BeerIndex/BeerCard.tsx index 09e03d4..1d8eac9 100644 --- a/src/components/BeerIndex/BeerCard.tsx +++ b/src/components/BeerIndex/BeerCard.tsx @@ -1,10 +1,11 @@ import Link from 'next/link'; import { FC, useContext } from 'react'; -import Image from 'next/image'; + import BeerPostQueryResult from '@/services/BeerPost/schema/BeerPostQueryResult'; import { z } from 'zod'; import UserContext from '@/contexts/UserContext'; import useGetBeerPostLikeCount from '@/hooks/data-fetching/beer-likes/useBeerPostLikeCount'; +import { CldImage } from 'next-cloudinary'; import BeerPostLikeButton from '../BeerById/BeerPostLikeButton'; const BeerCard: FC<{ post: z.infer }> = ({ post }) => { @@ -16,9 +17,10 @@ const BeerCard: FC<{ post: z.infer }> = ({ post }) =
{post.beerImages.length > 0 && ( - {post.name} }> = ({ @@ -17,11 +18,12 @@ const BreweryCard: FC<{ brewery: z.infer }> = ({
{brewery.breweryImages.length > 0 && ( - {brewery.name} )} diff --git a/src/config/cloudinary/CloudinaryStorage.ts b/src/config/cloudinary/CloudinaryStorage.ts index e60db02..1b4e40a 100644 --- a/src/config/cloudinary/CloudinaryStorage.ts +++ b/src/config/cloudinary/CloudinaryStorage.ts @@ -40,11 +40,7 @@ class CloudinaryStorage implements StorageEngine { * @param file - The file to be removed. * @param callback - The callback function to be called if an error occurs. */ - public _removeFile( - req: Request, - file: Express.Multer.File, - callback: (error: Error) => void, - ) { + _removeFile(req: Request, file: Express.Multer.File, callback: (error: Error) => void) { this.cloudinary.uploader.destroy(file.filename, { invalidate: true }, callback); } @@ -55,7 +51,7 @@ class CloudinaryStorage implements StorageEngine { * @param file - The file to be uploaded. * @param callback - The callback function to be called after the file is uploaded. */ - public _handleFile( + _handleFile( req: Request, file: Express.Multer.File, callback: (error?: unknown, info?: Partial) => void, diff --git a/src/pages/beers/[id]/index.tsx b/src/pages/beers/[id]/index.tsx index 97db821..ade7a96 100644 --- a/src/pages/beers/[id]/index.tsx +++ b/src/pages/beers/[id]/index.tsx @@ -1,7 +1,5 @@ import { NextPage, GetServerSideProps } from 'next'; import Head from 'next/head'; -import Image from 'next/image'; - import getBeerPostById from '@/services/BeerPost/getBeerPostById'; import BeerPostQueryResult from '@/services/BeerPost/schema/BeerPostQueryResult'; @@ -13,6 +11,7 @@ import { Carousel } from 'react-responsive-carousel'; import useMediaQuery from '@/hooks/utilities/useMediaQuery'; import { Tab } from '@headlessui/react'; import dynamic from 'next/dynamic'; +import { CldImage } from 'next-cloudinary'; const [BeerInfoHeader, BeerPostCommentsSection, BeerRecommendations] = [ dynamic(() => import('@/components/BeerById/BeerInfoHeader')), @@ -45,10 +44,11 @@ const BeerByIdPage: NextPage = ({ beerPost }) => { {beerPost.beerImages.length ? beerPost.beerImages.map((image, index) => (
- {image.alt} diff --git a/src/pages/breweries/[id]/index.tsx b/src/pages/breweries/[id]/index.tsx index 80510b2..b593086 100644 --- a/src/pages/breweries/[id]/index.tsx +++ b/src/pages/breweries/[id]/index.tsx @@ -4,7 +4,7 @@ import { GetServerSideProps, NextPage } from 'next'; import { z } from 'zod'; import Head from 'next/head'; -import Image from 'next/image'; + import 'react-responsive-carousel/lib/styles/carousel.min.css'; // requires a loader import { Carousel } from 'react-responsive-carousel'; import useMediaQuery from '@/hooks/utilities/useMediaQuery'; @@ -12,6 +12,7 @@ import { Tab } from '@headlessui/react'; import dynamic from 'next/dynamic'; import { MAPBOX_ACCESS_TOKEN } from '@/config/env'; +import { CldImage } from 'next-cloudinary'; const [BreweryInfoHeader, BreweryBeersSection, BreweryCommentsSection, BreweryPostMap] = [ dynamic(() => import('@/components/BreweryById/BreweryInfoHeader')), @@ -47,9 +48,10 @@ const BreweryByIdPage: NextPage = ({ breweryPost, mapboxToken {breweryPost.breweryImages.length ? breweryPost.breweryImages.map((image, index) => (
- {image.alt} { useRedirectWhenLoggedIn(); @@ -20,11 +20,11 @@ const LoginPage: NextPage = () => {
- Login Image