Skip to content

Commit

Permalink
feat: Move ProductTitles section to app folder (#2416)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

Move ProductTitles section to app folder

## How it works?


![chrome-capture-2024-8-19](https://github.com/user-attachments/assets/9f9f29a8-bf2b-4e7d-a12d-3d3757ed941b)


### How to test it?

```
Run yarn dev
Make sure that all the current pages are working as expected (/, /office and some /<slug>/p);
Make sure /fs-next-update is rendering with the ProductTitles section without errors.
```
  • Loading branch information
pedromtec authored Aug 23, 2024
1 parent 8840585 commit 21c5171
Show file tree
Hide file tree
Showing 15 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { useInView } from 'react-intersection-observer'
import type { ClientManyProductsQueryQueryVariables } from '@generated/graphql'
import { useViewItemListEvent } from 'app/sdk/analytics/hooks/useViewItemListEvent'
import ProductCard from 'src/components/product/ProductCard'
import ProductTilesSkeleton from 'src/components/skeletons/ProductTilesSkeleton'
import Tiles, { Tile } from 'src/components/ui/Tiles'
import ProductTilesSkeleton from 'app/components/skeletons/ProductTilesSkeleton'
import Tiles, { Tile } from 'app/components/ui/Tiles'
import { useProductsQuery } from 'src/sdk/product/useProductsQuery'

import Section from '../Section'
import Section from 'src/components/sections/Section'

import styles from './section.module.scss'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { PropsWithChildren } from 'react'

import Tiles, { Tile } from 'src/components/ui/Tiles'
import Tiles, { Tile } from 'app/components/ui/Tiles'

import { ProductTileSkeleton } from '.'

Expand Down
2 changes: 2 additions & 0 deletions packages/core/app/fs-next-update/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { OverriddenDefaultBannerText as BannerText } from 'app/components/sectio
import { OverriddenDefaultHero as Hero } from 'app/components/sections/Hero/OverriddenDefaultHero'
import { OverriddenDefaultProductShelf as ProductShelf } from 'app/components/sections/ProductShelf/OverriddenDefaultProductShelf'
import { OverriddenDefaultNewsletter as Newsletter } from 'app/components/sections/Newsletter/OverriddenDefaultNewsletter'
import ProductTiles from 'app/components/sections/ProductTiles'

import Incentives from 'app/components/sections/Incentives'
import PageProvider from 'app/sdk/overrides/PageProvider'
Expand All @@ -21,6 +22,7 @@ const COMPONENTS: Record<string, ComponentType<any>> = {
ProductShelf,
BannerText,
Newsletter,
ProductTiles,
...CUSTOM_COMPONENTS,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNew
import { OverriddenDefaultCrossSellingShelf as CrossSellingShelf } from 'src/components/sections/CrossSellingShelf/OverriddenDefaultCrossSellingShelf'
import { OverriddenDefaultNewsletter as Newsletter } from 'app/components/sections/Newsletter/OverriddenDefaultNewsletter'
import { OverriddenDefaultProductShelf as ProductShelf } from 'app/components/sections/ProductShelf/OverriddenDefaultProductShelf'
import ProductTiles from 'src/components/sections/ProductTiles'
import ProductTiles from 'app/components/sections/ProductTiles'
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
import MissingContentError from 'src/sdk/error/MissingContentError/MissingContentError'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sectio
import { OverriddenDefaultNewsletter as Newsletter } from 'app/components/sections/Newsletter/OverriddenDefaultNewsletter'
import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
import { OverriddenDefaultProductShelf as ProductShelf } from 'app/components/sections/ProductShelf/OverriddenDefaultProductShelf'
import ProductTiles from 'src/components/sections/ProductTiles'
import ProductTiles from 'app/components/sections/ProductTiles'
import ScrollToTopButton from 'src/components/sections/ScrollToTopButton'
import { ITEMS_PER_PAGE } from 'src/constants'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { OverriddenDefaultBreadcrumb as Breadcrumb } from 'src/components/sectio
import { OverriddenDefaultNewsletter as Newsletter } from 'app/components/sections/Newsletter/OverriddenDefaultNewsletter'
import { OverriddenDefaultProductGallery as ProductGallery } from 'src/components/sections/ProductGallery/OverriddenDefaultProductGallery'
import { OverriddenDefaultProductShelf as ProductShelf } from 'app/components/sections/ProductShelf/OverriddenDefaultProductShelf'
import ProductTiles from 'src/components/sections/ProductTiles'
import ProductTiles from 'app/components/sections/ProductTiles'
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
import { SearchPageContextType } from 'src/pages/s'
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/pages/[slug]/p.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { OverriddenDefaultCrossSellingShelf as CrossSellingShelf } from 'src/com
import { OverriddenDefaultNewsletter as Newsletter } from 'app/components/sections/Newsletter/OverriddenDefaultNewsletter'
import { OverriddenDefaultProductDetails as ProductDetails } from 'src/components/sections/ProductDetails/OverriddenDefaultProductDetails'
import { OverriddenDefaultProductShelf as ProductShelf } from 'app/components/sections/ProductShelf/OverriddenDefaultProductShelf'
import ProductTiles from 'src/components/sections/ProductTiles'
import ProductTiles from 'app/components/sections/ProductTiles'
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
import { useSession } from 'src/sdk/session'
import { mark } from 'src/sdk/tests/mark'
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getPage } from 'app/server/cms'
import BannerNewsletter from 'src/components/sections/BannerNewsletter/BannerNewsletter'
import { OverriddenDefaultNewsletter as Newsletter } from 'app/components/sections/Newsletter/OverriddenDefaultNewsletter'
import { OverriddenDefaultProductShelf as ProductShelf } from 'app/components/sections/ProductShelf/OverriddenDefaultProductShelf'
import ProductTiles from 'src/components/sections/ProductTiles'
import ProductTiles from 'app/components/sections/ProductTiles'
import CUSTOM_COMPONENTS from 'src/customizations/src/components'
import { mark } from 'src/sdk/tests/mark'

Expand Down

0 comments on commit 21c5171

Please sign in to comment.