updates
This commit is contained in:
@@ -3,7 +3,6 @@ import Image from "next/legacy/image";
|
||||
import Link from "next/link";
|
||||
import { useCaseStudies } from "@/lib/hooks/useCaseStudy";
|
||||
import { getImageUrl } from "@/lib/imageUtils";
|
||||
import one from "@/public/images/case/one.png";
|
||||
|
||||
const CaseItems = () => {
|
||||
const { caseStudies, loading: casesLoading } = useCaseStudies();
|
||||
@@ -56,7 +55,7 @@ const CaseItems = () => {
|
||||
<div className="thumb mb-24">
|
||||
<Link href={`/case-study/${caseStudy.slug}`} className="w-100">
|
||||
<Image
|
||||
src={caseStudy.thumbnail ? getImageUrl(caseStudy.thumbnail) : one}
|
||||
src={caseStudy.thumbnail ? getImageUrl(caseStudy.thumbnail) : "/images/case/one.png"}
|
||||
className="w-100 mh-300"
|
||||
alt={caseStudy.title}
|
||||
width={600}
|
||||
|
||||
@@ -5,8 +5,7 @@ import Link from "next/link";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useCaseStudy } from "@/lib/hooks/useCaseStudy";
|
||||
import { getImageUrl } from "@/lib/imageUtils";
|
||||
import poster from "@/public/images/case/poster.png";
|
||||
import project from "@/public/images/case/project.png";
|
||||
import { sanitizeHTML } from "@/lib/security/sanitize";
|
||||
|
||||
interface CaseSingleProps {
|
||||
slug: string;
|
||||
@@ -204,12 +203,12 @@ const CaseSingle = ({ slug }: CaseSingleProps) => {
|
||||
{caseStudy.project_overview ? (
|
||||
<div
|
||||
className="content-html"
|
||||
dangerouslySetInnerHTML={{ __html: caseStudy.project_overview }}
|
||||
dangerouslySetInnerHTML={{ __html: sanitizeHTML(caseStudy.project_overview) }}
|
||||
/>
|
||||
) : (
|
||||
<div
|
||||
className="content-html"
|
||||
dangerouslySetInnerHTML={{ __html: caseStudy.description || '' }}
|
||||
dangerouslySetInnerHTML={{ __html: sanitizeHTML(caseStudy.description || '') }}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -217,7 +216,7 @@ const CaseSingle = ({ slug }: CaseSingleProps) => {
|
||||
{caseStudy.description && (
|
||||
<div
|
||||
className="content-html full-description mt-40"
|
||||
dangerouslySetInnerHTML={{ __html: caseStudy.description }}
|
||||
dangerouslySetInnerHTML={{ __html: sanitizeHTML(caseStudy.description) }}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
@@ -345,7 +344,7 @@ const CaseSingle = ({ slug }: CaseSingleProps) => {
|
||||
<h2 className="section-title">Site Map & Process</h2>
|
||||
<div
|
||||
className="content-html"
|
||||
dangerouslySetInnerHTML={{ __html: caseStudy.site_map_content }}
|
||||
dangerouslySetInnerHTML={{ __html: sanitizeHTML(caseStudy.site_map_content) }}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +12,8 @@ const Process = ({ slug }: ProcessProps) => {
|
||||
return null;
|
||||
}
|
||||
|
||||
const processSteps = caseStudy.process_steps;
|
||||
|
||||
return (
|
||||
<section className="case-study-process luxury-process pt-120 pb-120">
|
||||
<div className="container">
|
||||
@@ -28,7 +30,7 @@ const Process = ({ slug }: ProcessProps) => {
|
||||
</div>
|
||||
<div className="col-12 col-lg-7">
|
||||
<div className="process-steps-list">
|
||||
{caseStudy.process_steps.map((step, index) => (
|
||||
{processSteps.map((step, index) => (
|
||||
<div key={step.id} className="process-step-item">
|
||||
<div className="step-number">
|
||||
{String(step.step_number).padStart(2, '0')}
|
||||
@@ -37,7 +39,7 @@ const Process = ({ slug }: ProcessProps) => {
|
||||
<h4 className="step-title">{step.title}</h4>
|
||||
<p className="step-description">{step.description}</p>
|
||||
</div>
|
||||
{index < caseStudy.process_steps.length - 1 && (
|
||||
{index < processSteps.length - 1 && (
|
||||
<div className="step-connector"></div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,6 @@ import Image from "next/image";
|
||||
import Link from "next/link";
|
||||
import { useCaseStudy } from "@/lib/hooks/useCaseStudy";
|
||||
import { getImageUrl } from "@/lib/imageUtils";
|
||||
import one from "@/public/images/case/one.png";
|
||||
|
||||
interface RelatedCaseProps {
|
||||
slug: string;
|
||||
@@ -34,7 +33,7 @@ const RelatedCase = ({ slug }: RelatedCaseProps) => {
|
||||
<Link href={`/case-study/${relatedCase.slug}`} className="case-link">
|
||||
<div className="case-image-wrapper">
|
||||
<Image
|
||||
src={relatedCase.thumbnail ? getImageUrl(relatedCase.thumbnail) : one}
|
||||
src={relatedCase.thumbnail ? getImageUrl(relatedCase.thumbnail) : "/images/case/one.png"}
|
||||
className="case-image"
|
||||
alt={relatedCase.title}
|
||||
width={400}
|
||||
|
||||
Reference in New Issue
Block a user