Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
refactor: getting images from wp
Browse files Browse the repository at this point in the history
  • Loading branch information
oxiqod committed Jun 14, 2024
1 parent ce02a45 commit 5b8ac1e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { splitItems } from './helpers'

const LandingAbout: FC<LandingAboutProps> = ({ language }) => {
const { aboutData } = useAbout()

console.log(aboutData)
const [topSide, bottomSide] = splitItems(aboutData[language])
return (
<Box px={['20px', '20px', '0px']}>
Expand All @@ -39,7 +39,7 @@ const LandingAbout: FC<LandingAboutProps> = ({ language }) => {
title={title}
content={content}
excerpt={excerpt}
image={image}
image={image.node}
index={index}
/>
<Condition match={index !== topSide.length - 1}>
Expand All @@ -62,7 +62,7 @@ const LandingAbout: FC<LandingAboutProps> = ({ language }) => {
title={title}
content={content}
excerpt={excerpt}
image={image}
image={image.node}
index={index}
/>
<Condition match={index !== bottomSide.length - 1}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ const LandingFeedback: FC<LandingFeedbackProps> = ({ language }) => {

const obj = extractObject('contentAddons', 'lead', feedbackData[language])

const imageUrl = obj.image.sourceUrl
const imageAltText = obj.image.altText
const imageUrl = obj.image.node.sourceUrl
const imageAltText = obj.image.node.altText
const { title } = obj
const { content } = obj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const LandingHero: FC<HeroProps> = ({ language }) => {
const [backgroundColor, setBackgroundColor] = useState<string>('')
const [videoIsPlaying, setVideoIsPlaying] = useState<boolean>(false)

const { title, content } = extractObject('contentAddons', 'lead', heroData[language])
const { title , content } = extractObject('contentAddons', 'lead', heroData[language])

useEffect(() => {
if (!videoIsPlaying) return
Expand Down
2 changes: 1 addition & 1 deletion landing/fragments/landing-reviews/src/data/reviews.hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const useReviews = () => {
const { data } = useQuery(GET_REVIEWS,
// { fetchPolicy: 'cache-only' }
)
console.log(data)

if (!data) {
return { reviewsData: { RU: [], EN: [] } }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const Item: FC<ItemProps> = ({ category, language }) => (
<Layout flexBasis={[20, 20, 32]} />
<Row>
<Layout width={56} height={56}>
<Image src={category?.skillAddons?.icon?.mediaItemUrl} />
<Image src={category?.skillAddons?.icon?.node?.mediaItemUrl} />
</Layout>
</Row>
<Layout flexBasis={24} />
Expand Down
8 changes: 4 additions & 4 deletions landing/pages/index-page/src/index.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const IndexPage: FC<IndexPageProps> = ({ SEO }) => {
containerRef={containerRef}
>
<Navigation language={language} languageVar={languageVar} />
{/*<Seo language={language} SEO={SEO} />*/}
<Seo language={language} SEO={SEO} />
<ScrollContainer data-scroll-container ref={containerRef}>
{/*<LandingHero language={language} />*/}
{/*<LandingAbout language={language} />*/}
{/*<LandingReviews language={language} />*/}
{/*<LandingTeam language={language} />*/}
<LandingAbout language={language} />
<LandingReviews language={language} />
<LandingTeam language={language} />
<LandingFeedback language={language} />
<LandingFooter language={language} />
</ScrollContainer>
Expand Down
2 changes: 1 addition & 1 deletion landing/pages/index-page/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { default } from './index.page'
// export * from './get-static-props'
export * from './get-static-props'

0 comments on commit 5b8ac1e

Please sign in to comment.