Skip to content

Commit

Permalink
fix: cms url from config
Browse files Browse the repository at this point in the history
  • Loading branch information
shubham-1806 committed Dec 11, 2023
1 parent f0de3b6 commit b9a2b14
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/components/ClusterCarousel/ClusterCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import leftArrow from '../../assets/images/leftArrow.png';
import rightArrow from '../../assets/images/rightArrow.png';
import { useEffect, useState } from 'react';
import { getClusterDetails } from '@/utils/events_cms';
import { CMS_URL } from '@/config/config';

const ClusterCarousel = ({ id, name }: { id: number; name: string }) => {
const [details, setDetails] = useState<any>([]);
Expand Down Expand Up @@ -115,11 +116,7 @@ const ClusterCarousel = ({ id, name }: { id: number; name: string }) => {
>
<div className="w-full h-full lg:w-3/4 2xl:w-4/5 m-auto flex justify-center items-center">
<Image
src={
data.image
? 'http://localhost:1337' + data.image?.url
: temp
}
src={data.image ? CMS_URL + data.image?.url : temp}
width={data.image?.width}
height={Math.min(data.image?.height, 100)}
objectPosition="center"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3536,6 +3536,11 @@ typed-array-length@^1.0.4:
for-each "^0.3.3"
is-typed-array "^1.1.9"

typescript@^4.0:
version "4.9.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a"
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==

typescript@^5.2.2:
version "5.2.2"
resolved "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz"
Expand Down

0 comments on commit b9a2b14

Please sign in to comment.