diff --git a/next.config.ts b/next.config.ts index 4254575..fffbeec 100644 --- a/next.config.ts +++ b/next.config.ts @@ -13,13 +13,25 @@ const nextConfig = { remotePatterns: [ { protocol: 'https', - hostname: 'app.modstagram.ir', + hostname: 'api.modstagram.com', port: '', - pathname: '/**', + pathname: '/**', }, { protocol: 'https', - hostname: 'blog.modstagram.com', // اجازه دادن به نمایش تصاویر وبلاگ + hostname: 'cdn.modstagram.com', + port: '', + pathname: '/**', + }, + { + protocol: 'https', + hostname: 'app.modstagram.ir', + port: '', + pathname: '/**', + }, + { + protocol: 'https', + hostname: 'blog.modstagram.com', port: '', pathname: '/**', }, diff --git a/src/app/(auth)/verify/avatar/page.tsx b/src/app/(auth)/verify/avatar/page.tsx index 038b2ef..2621531 100644 --- a/src/app/(auth)/verify/avatar/page.tsx +++ b/src/app/(auth)/verify/avatar/page.tsx @@ -3,7 +3,7 @@ import React, { useEffect, useState, useCallback } from "react"; import Container from "@/components/elements/Container"; import AuthNextButton from "@/components/auth/AuthNextButton"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import useAxios from "@/hooks/useAxios"; import { IProfileData } from "@/types/types"; import Image from "next/image"; diff --git a/src/app/(auth)/verify/confirm/page.tsx b/src/app/(auth)/verify/confirm/page.tsx index fd2709b..12aff28 100644 --- a/src/app/(auth)/verify/confirm/page.tsx +++ b/src/app/(auth)/verify/confirm/page.tsx @@ -9,7 +9,7 @@ import Modal from "@/components/elements/Modal"; import Link from "next/link"; import Image from "next/image"; import { useUser } from "@/hooks/useUser"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; function Confirm() { @@ -41,7 +41,7 @@ function Confirm() { width={280} height={280} alt={user?.user_name || "user profile"} - src={`${IMAGE_BASE_URL}${user?.profile_image}`} + src={buildStorageUrl(user?.profile_image)} unoptimized={true} />
diff --git a/src/app/(auth)/verify/national-cart/page.tsx b/src/app/(auth)/verify/national-cart/page.tsx index 9fcc53f..c62d1dd 100644 --- a/src/app/(auth)/verify/national-cart/page.tsx +++ b/src/app/(auth)/verify/national-cart/page.tsx @@ -9,7 +9,7 @@ import AuthNextButton from "@/components/auth/AuthNextButton"; import toast from "react-hot-toast"; import AuthUserDetails from "@/components/auth/AuthUserDetails"; import Image from "next/image"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import AuthRules from "@/components/auth/AuthRules"; function NationalCart() { diff --git a/src/app/(projects)/academy/[id]/[title]/CourseClient.tsx b/src/app/(projects)/academy/[id]/[title]/CourseClient.tsx index 78179ea..538aa9f 100644 --- a/src/app/(projects)/academy/[id]/[title]/CourseClient.tsx +++ b/src/app/(projects)/academy/[id]/[title]/CourseClient.tsx @@ -20,7 +20,7 @@ import { import { Course } from "@/types/types"; import useAxios from "@/hooks/useAxios"; import { Comments } from "@/components/academy/CommentsModal"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { usePathname } from "next/navigation"; import Cookies from "js-cookie"; @@ -670,7 +670,7 @@ useEffect(() => { alt={item?.user_id?.user_name || "کاربر"} src={ item?.user_id?.profile_image - ? `${IMAGE_BASE_URL}${item.user_id.profile_image}` + ? buildStorageUrl(item.user_id.profile_image) : "/images/default-avatar.png" } priority={true} diff --git a/src/app/(projects)/academy/profile/[academyId]/page.tsx b/src/app/(projects)/academy/profile/[academyId]/page.tsx index 9710d5f..90de6c8 100644 --- a/src/app/(projects)/academy/profile/[academyId]/page.tsx +++ b/src/app/(projects)/academy/profile/[academyId]/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import React, { useEffect, useState } from "react"; import { Academy, Course } from "@/types/types"; import Container from "@/components/elements/Container"; diff --git a/src/app/billboards/profile/[...id]/page.tsx b/src/app/billboards/profile/[...id]/page.tsx index 15bf7e9..52eff0f 100644 --- a/src/app/billboards/profile/[...id]/page.tsx +++ b/src/app/billboards/profile/[...id]/page.tsx @@ -1,4 +1,4 @@ -import { BASE_URL, IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { BASE_URL, IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import React, { cache } from "react"; import { cookies } from "next/headers"; import { IAdvertisingProfile } from "@/types/types"; diff --git a/src/app/billboards/profile/[id]/[title]/page.tsx b/src/app/billboards/profile/[id]/[title]/page.tsx index 15bf7e9..52eff0f 100644 --- a/src/app/billboards/profile/[id]/[title]/page.tsx +++ b/src/app/billboards/profile/[id]/[title]/page.tsx @@ -1,4 +1,4 @@ -import { BASE_URL, IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { BASE_URL, IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import React, { cache } from "react"; import { cookies } from "next/headers"; import { IAdvertisingProfile } from "@/types/types"; diff --git a/src/app/posts/[id]/page.tsx b/src/app/posts/[id]/page.tsx index 487a9f6..bbd298f 100644 --- a/src/app/posts/[id]/page.tsx +++ b/src/app/posts/[id]/page.tsx @@ -1,7 +1,7 @@ import { Metadata } from "next"; import { fetchPostById } from "@/api/fetchPostById"; import PostFeedView from "@/components/posts/PostFeedView"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { Suspense } from "react"; import PageLoader from "@/components/ui/PageLoader"; diff --git a/src/app/settings/academy/storeProfile/page.tsx b/src/app/settings/academy/storeProfile/page.tsx index e45b4f1..03197c5 100644 --- a/src/app/settings/academy/storeProfile/page.tsx +++ b/src/app/settings/academy/storeProfile/page.tsx @@ -28,7 +28,7 @@ import "leaflet/dist/leaflet.css"; import { useRouter } from "next/navigation"; import useAxios from "@/hooks/useAxios"; import { Academy } from "@/types/types"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; // Zod schema for store settings const storeSchema = z.object({ diff --git a/src/app/settings/chats/page.tsx b/src/app/settings/chats/page.tsx index da32a79..96efd3a 100644 --- a/src/app/settings/chats/page.tsx +++ b/src/app/settings/chats/page.tsx @@ -2,7 +2,7 @@ import Container from "@/components/elements/Container"; import RoundedInput from "@/components/elements/RoundedInput"; -import { IMAGE_BASE_URL, SOCKET_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, SOCKET_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import PageTitle from "@/components/settings/PageTitle"; import UserDetails from "@/components/settings/UserDetails"; import useInfiniteScroll from "@/hooks/useInfiniteScroll"; @@ -115,7 +115,7 @@ function Chats() { width={56} height={56} alt={item?.user_name} - src={IMAGE_BASE_URL + item?.profile_image} + src={buildStorageUrl(item?.profile_image)} className="h-14 w-14 rounded-full object-cover" /> ) : ( diff --git a/src/app/settings/edit/Authentication/page.tsx b/src/app/settings/edit/Authentication/page.tsx index 669ad3b..c88ffcb 100644 --- a/src/app/settings/edit/Authentication/page.tsx +++ b/src/app/settings/edit/Authentication/page.tsx @@ -9,7 +9,7 @@ import AuthNextButton from "@/components/auth/AuthNextButton"; import toast from "react-hot-toast"; import AuthUserDetails from "@/components/auth/AuthUserDetails"; import Image from "next/image"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import AuthRules from "@/components/auth/AuthRules"; function NationalCart() { diff --git a/src/app/settings/edit/License/page.tsx b/src/app/settings/edit/License/page.tsx index a7a586f..229951a 100644 --- a/src/app/settings/edit/License/page.tsx +++ b/src/app/settings/edit/License/page.tsx @@ -7,7 +7,7 @@ import React, { useState, useEffect } from "react"; import AuthNextButton from "@/components/auth/AuthNextButton"; import Image from "next/image"; import { useUser } from "@/hooks/useUser"; -import { BASE_URL, IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { BASE_URL, IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import useAxios from "@/hooks/useAxios"; import toast from "react-hot-toast"; import Cookies from "js-cookie"; @@ -185,7 +185,7 @@ function LicensePage() { alt={user?.user_name || "user profile"} src={ user?.profile_image - ? `${IMAGE_BASE_URL}${user.profile_image}` + ? buildStorageUrl(user.profile_image) : "/images/placeholder.png" } unoptimized={true} diff --git a/src/app/settings/edit/avatar/page.tsx b/src/app/settings/edit/avatar/page.tsx index 339edf9..1e72cb7 100644 --- a/src/app/settings/edit/avatar/page.tsx +++ b/src/app/settings/edit/avatar/page.tsx @@ -2,7 +2,7 @@ import AuthNextButton from "@/components/auth/AuthNextButton"; import Container from "@/components/elements/Container"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import useAxios from "@/hooks/useAxios"; import { useUser } from "@/hooks/useUser"; import Image from "next/image"; diff --git a/src/app/users/[username]/page.tsx b/src/app/users/[username]/page.tsx index 346109b..a6069e7 100644 --- a/src/app/users/[username]/page.tsx +++ b/src/app/users/[username]/page.tsx @@ -1,4 +1,4 @@ -import { BASE_URL, IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { BASE_URL, IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import React from "react"; import { cookies } from "next/headers"; import { User } from "@/types/types"; @@ -30,7 +30,7 @@ export async function generateMetadata({ params }: IUserProps): Promise ) : ( diff --git a/src/components/billboards/BillboardPage/BillboardImageSlider.tsx b/src/components/billboards/BillboardPage/BillboardImageSlider.tsx index 33b82df..669ec59 100644 --- a/src/components/billboards/BillboardPage/BillboardImageSlider.tsx +++ b/src/components/billboards/BillboardPage/BillboardImageSlider.tsx @@ -5,7 +5,7 @@ import { Swiper, SwiperSlide } from "swiper/react"; import "swiper/css"; import { Pagination } from "swiper/modules"; import Image from "next/image"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; interface BillboardImageSliderProps { images: string[]; diff --git a/src/components/billboards/MainBillboardCard/BillboardCommentsModal.tsx b/src/components/billboards/MainBillboardCard/BillboardCommentsModal.tsx index 02d62a1..13507cb 100644 --- a/src/components/billboards/MainBillboardCard/BillboardCommentsModal.tsx +++ b/src/components/billboards/MainBillboardCard/BillboardCommentsModal.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react"; import Modal from "../../elements/Modal"; import Image from "next/image"; import useInfiniteScroll from "@/hooks/useInfiniteScroll"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import RoundedInput from "@/components/elements/RoundedInput"; import useAxios from "@/hooks/useAxios"; @@ -81,7 +81,7 @@ function BillboardCommentsModal({ width={50} height={50} alt={item?.userId?.user_name} - src={`${IMAGE_BASE_URL}${item?.userId?.profile_image}`} + src={buildStorageUrl(item?.userId?.profile_image)} priority={true} unoptimized={true} /> diff --git a/src/components/billboards/MainBillboardCard/MainBillboardCard.tsx b/src/components/billboards/MainBillboardCard/MainBillboardCard.tsx index 10a506d..d4dc95a 100644 --- a/src/components/billboards/MainBillboardCard/MainBillboardCard.tsx +++ b/src/components/billboards/MainBillboardCard/MainBillboardCard.tsx @@ -1,5 +1,5 @@ import RoundedDiv from "@/components/elements/RoundedDiv"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { IAdvertising } from "@/types/types"; import Image from "next/image"; import Link from "next/link"; diff --git a/src/components/billboards/NewBillboard/step1/ImageUploader.tsx b/src/components/billboards/NewBillboard/step1/ImageUploader.tsx index 5d75032..90dce75 100644 --- a/src/components/billboards/NewBillboard/step1/ImageUploader.tsx +++ b/src/components/billboards/NewBillboard/step1/ImageUploader.tsx @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { useState } from "react"; type ImageUploaderProps = { diff --git a/src/components/billboards/Profile/AdProfileContentPosts.tsx b/src/components/billboards/Profile/AdProfileContentPosts.tsx index 47c4c14..a255465 100644 --- a/src/components/billboards/Profile/AdProfileContentPosts.tsx +++ b/src/components/billboards/Profile/AdProfileContentPosts.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ "use client"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import React, { useState } from "react"; import Modal from "react-modal"; import { Swiper, SwiperSlide } from "swiper/react"; diff --git a/src/components/billboards/Profile/AdProfileHead.tsx b/src/components/billboards/Profile/AdProfileHead.tsx index 6ac8e8d..59fc2c0 100644 --- a/src/components/billboards/Profile/AdProfileHead.tsx +++ b/src/components/billboards/Profile/AdProfileHead.tsx @@ -1,5 +1,5 @@ "use client" -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { IAdvertisingProfile } from "@/types/types"; import Image from "next/image"; import React, { useState } from "react"; @@ -45,7 +45,7 @@ function AdProfileHead({ profile, id }: AdProfileHeadProps) { width={120} height={120} alt={profile?.vitrine_name || "Name"} - src={`${IMAGE_BASE_URL}${profile_image}`} + src={buildStorageUrl(profile_image)} unoptimized={true} /> ) : ( @@ -97,7 +97,7 @@ function AdProfileHead({ profile, id }: AdProfileHeadProps) { width={120} height={120} alt={profile?.vitrine_name || "Name"} - src={`${IMAGE_BASE_URL}${profile_image}`} + src={buildStorageUrl(profile_image)} unoptimized={true} /> ) : ( diff --git a/src/components/chat/ChatHeader.tsx b/src/components/chat/ChatHeader.tsx index 5b91735..33cb5fb 100644 --- a/src/components/chat/ChatHeader.tsx +++ b/src/components/chat/ChatHeader.tsx @@ -5,7 +5,7 @@ import Image from "next/image"; import Link from "next/link"; import { useState } from "react"; import { FiChevronRight } from "react-icons/fi"; -import { IMAGE_BASE_URL } from "../main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "../main/BaseUrl"; import { useRouter } from "next/navigation"; import ChatHeaderMenu from "./ChatHeaderMenu"; @@ -46,7 +46,7 @@ function ChatHeader({ width={40} height={40} alt="" - src={IMAGE_BASE_URL + user.profile_image} + src={buildStorageUrl(user.profile_image)} className="h-10 w-10 shrink-0 rounded-full object-cover" /> ) : ( diff --git a/src/components/chat/ChatMessageCard.tsx b/src/components/chat/ChatMessageCard.tsx index 31ae52a..392a82b 100644 --- a/src/components/chat/ChatMessageCard.tsx +++ b/src/components/chat/ChatMessageCard.tsx @@ -5,7 +5,7 @@ import { useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import Link from "next/link"; import { User } from "@/types/types"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import ReadReceipt from "./ReadReceipt"; import VoiceMessagePlayer from "./VoiceMessagePlayer"; import FileMessageBubble from "./FileMessageBubble"; diff --git a/src/components/chat/ForwardMessageModal.tsx b/src/components/chat/ForwardMessageModal.tsx index 08382d4..07c308c 100644 --- a/src/components/chat/ForwardMessageModal.tsx +++ b/src/components/chat/ForwardMessageModal.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import Image from "next/image"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import useAxios from "@/hooks/useAxios"; import toast from "react-hot-toast"; import IOSSpinner from "@/components/ui/IOSSpinner"; @@ -147,7 +147,7 @@ export default function ForwardMessageModal({ > {u.profile_image ? ( ) : ( @@ -52,7 +52,7 @@ function UserInfo({ width={75} height={75} alt={user_name || ""} - src={`${IMAGE_BASE_URL}${profile_image}`} + src={buildStorageUrl(profile_image)} unoptimized={true} /> ) : ( diff --git a/src/components/models/MainModelCard/CommentsModal.tsx b/src/components/models/MainModelCard/CommentsModal.tsx index e7182b3..0921aac 100644 --- a/src/components/models/MainModelCard/CommentsModal.tsx +++ b/src/components/models/MainModelCard/CommentsModal.tsx @@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react"; import Modal from "../../elements/Modal"; import Image from "next/image"; import useInfiniteScroll from "@/hooks/useInfiniteScroll"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import RoundedInput from "@/components/elements/RoundedInput"; import useAxios from "@/hooks/useAxios"; import toast from "react-hot-toast"; @@ -124,7 +124,7 @@ function CommentsModal({ isOpen, onClose, userId, postId }: CommentsModalProps) width={50} height={50} alt={item?.user?.user_name} - src={`${IMAGE_BASE_URL}${item?.user?.profile_image}`} + src={buildStorageUrl(item?.user?.profile_image)} unoptimized />
diff --git a/src/components/models/MainModelCard/MainModelCard.tsx b/src/components/models/MainModelCard/MainModelCard.tsx index 790d644..a538050 100644 --- a/src/components/models/MainModelCard/MainModelCard.tsx +++ b/src/components/models/MainModelCard/MainModelCard.tsx @@ -11,7 +11,7 @@ import { Post } from "@/types/types"; import Image from "next/image"; import MainModelCardActions from "./MainModelCardActions"; import Link from "next/link"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { useUserById } from "@/hooks/getUserById"; import "slick-carousel/slick/slick.css"; import "slick-carousel/slick/slick-theme.css"; @@ -170,13 +170,14 @@ function MainModelCard({ postData }: { postData: Post }) { {user_name}
diff --git a/src/components/models/ModelPage/MainModelCardPost.tsx b/src/components/models/ModelPage/MainModelCardPost.tsx index e61030b..8049e81 100644 --- a/src/components/models/ModelPage/MainModelCardPost.tsx +++ b/src/components/models/ModelPage/MainModelCardPost.tsx @@ -5,7 +5,7 @@ import { Post } from "@/types/types"; import Image from "next/image"; import MainModelCardActions from "../MainModelCard/MainModelCardActions"; import Link from "next/link"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { useUserById } from "@/hooks/getUserById"; import Slider from "react-slick"; import "slick-carousel/slick/slick.css"; @@ -169,7 +169,7 @@ function MainModelCard({ postData }: { postData: Post }) { {user_name} ) : ( diff --git a/src/components/posts/TagUsersPicker.tsx b/src/components/posts/TagUsersPicker.tsx index 5549c11..1b4b221 100644 --- a/src/components/posts/TagUsersPicker.tsx +++ b/src/components/posts/TagUsersPicker.tsx @@ -3,7 +3,7 @@ import { useEffect, useState } from "react"; import Image from "next/image"; import useAxios from "@/hooks/useAxios"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import { FiUserPlus, FiX } from "react-icons/fi"; import toast from "react-hot-toast"; @@ -111,7 +111,7 @@ export default function TagUsersPicker({ > {u.profile_image ? ( )} diff --git a/src/components/settings/UserDetails.tsx b/src/components/settings/UserDetails.tsx index 74e431a..3eae01e 100644 --- a/src/components/settings/UserDetails.tsx +++ b/src/components/settings/UserDetails.tsx @@ -2,7 +2,7 @@ import Image from "next/image"; import React, { useEffect, useState } from "react"; -import { IMAGE_BASE_URL } from "../main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "../main/BaseUrl"; import CompleteRegister from "./settings/CompleteRegister"; import Link from "next/link"; import { useUser } from "@/hooks/useUser"; @@ -29,7 +29,7 @@ function UserDetails() { width={120} height={120} alt={user?.user_name || "user profile"} - src={`${IMAGE_BASE_URL}${user?.profile_image}`} + src={buildStorageUrl(user?.profile_image)} unoptimized={true} />
diff --git a/src/components/settings/my-billboards/Profile/AvatarUploader.tsx b/src/components/settings/my-billboards/Profile/AvatarUploader.tsx index 0ebc8fd..fd40e52 100644 --- a/src/components/settings/my-billboards/Profile/AvatarUploader.tsx +++ b/src/components/settings/my-billboards/Profile/AvatarUploader.tsx @@ -1,7 +1,7 @@ // components/AvatarUploader.tsx import React from "react"; import Image from "next/image"; -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; interface AvatarUploaderProps { avatar: string | null; diff --git a/src/config/SEO.tsx b/src/config/SEO.tsx index b8347b5..685f2c3 100644 --- a/src/config/SEO.tsx +++ b/src/config/SEO.tsx @@ -1,6 +1,6 @@ /*@typescript-eslint/no-explicit-any*/ -import { IMAGE_BASE_URL } from "@/components/main/BaseUrl"; +import { IMAGE_BASE_URL, buildStorageUrl } from "@/components/main/BaseUrl"; import Head from "next/head"; type SEOProps = { @@ -24,7 +24,7 @@ const SEO: React.FC = ({ type, data }) => { case "user": title = `${data.first_name} ${data.last_name} `; description = `${data.bio} - ${data.user_name} - ${data.expertise}`; - image = `${IMAGE_BASE_URL}${data.profile_image}`; + image = buildStorageUrl(data.profile_image); break; case "billboard":