Pavle Golubovic пре 2 година
родитељ
комит
d3e84d2124
2 измењених фајлова са 23 додато и 22 уклоњено
  1. 14
    12
      frontend/src/components/shared/VideoComponent.jsx
  2. 9
    10
      frontend/src/pages/CaseStudyPage.jsx

+ 14
- 12
frontend/src/components/shared/VideoComponent.jsx Прегледај датотеку

@@ -23,19 +23,21 @@ const VideoComponent = ({ source, alt }) => {
// this is needed becouse Strapi has a wierd bug that duplicates the folder path from Cloudflare,
// this function checks the prop for dublicate folder path and removes one instance
function handleString(str) {
if (str.indexOf('media-lib/') !== -1) {
let afterMediaLib = str.substring(str.indexOf('media-lib/') + 'media-lib/'.length);
// if (str.indexOf('media-lib/') !== -1) {
// let afterMediaLib = str.substring(str.indexOf('media-lib/') + 'media-lib/'.length);

if (
afterMediaLib.indexOf('media-lib/') !== -1 &&
afterMediaLib.substring(
0,
afterMediaLib.indexOf('media-lib/') + 'media-lib/'.length,
) === 'media-lib/'
) {
str = str.replace('media-lib/', '');
}
}
// if (
// afterMediaLib.indexOf('media-lib/') !== -1 &&
// afterMediaLib.substring(
// 0,
// afterMediaLib.indexOf('media-lib/') + 'media-lib/'.length,
// ) === 'media-lib/'
// ) {
// str = str.replace('media-lib/test-bucket', '');
// }
// }
//hardcoded to this path
str = str.replace('/media-lib/test-bucket', '');
setString(str);
}


+ 9
- 10
frontend/src/pages/CaseStudyPage.jsx Прегледај датотеку

@@ -23,10 +23,9 @@ const strapiPopulate = [
'Slug',
'Heading.paragraphs',
'Stat',
'AboutClient.paragraph',
'Goal.paragraph',
'Country',
'Industry',
'Domain.paragraph',
'Challanges.paragraph',
'Solution.paragraph',
'Results.paragraph',
@@ -116,17 +115,17 @@ export default function CaseStudyPage() {

<section
id="client"
className="flex flex-col items-center justify-center mt-4"
className="flex flex-col items-center justify-center mt-4 lg:mx-64"
>
<div className="my-8 flex flex-col md:flex-row justify-center items-start w-full max-w-custom m-auto px-8 xl:px-0">
{data[0].attributes.AboutClient && (
{data[0].attributes.Goal && (
<div className="w-full md:w-1/2">
<h3 className="h3-heading text-teal-600">
{data[0].attributes.AboutClient.title}
{data[0].attributes.Goal.title}
</h3>
{data[0].attributes.AboutClient.paragraph &&
data[0].attributes.AboutClient.paragraph.length > 0 &&
data[0].attributes.AboutClient.paragraph.map((item, index) => (
{data[0].attributes.Goal.paragraph &&
data[0].attributes.Goal.paragraph.length > 0 &&
data[0].attributes.Goal.paragraph.map((item, index) => (
<p key={index} className="paragraph mt-4">
{item.ParagraphElement}
</p>
@@ -178,7 +177,7 @@ export default function CaseStudyPage() {
{data[0].attributes.Stat && (
<motion.section
id="status-numbers"
className="flex flex-col md:flex-row items-start justify-between w-full gap-90p px-90p"
className="flex flex-col md:flex-row lg:items-start justify-between w-full gap-90p px-90p items-center"
initial={{ y: 60, opacity: 0 }}
whileInView={{ y: 0, opacity: 1 }}
transition={{ duration: 0.5, ease: 'easeOut' }}
@@ -242,7 +241,7 @@ export default function CaseStudyPage() {

{/* Results Section */}
{data[0].attributes.Results && (
<section id="results" className="flex flex-col items-center justify-center">
<section id="results" className="flex flex-col items-center justify-center lg:mx-64">
<div className="my-8 flex flex-col justify-center items-center w-full max-w-custom m-auto px-8 xl:px-0">
<div className="w-full">
<h3 className="h3-heading text-dg-secondary">

Loading…
Откажи
Сачувај