-
Notifications
You must be signed in to change notification settings - Fork 392
upcoming: [UIE-9814] - Implement the main product grid with category grouping and load more functionality #13267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
b5a2f63
661f44b
5af99b5
c426d11
00fb001
92a7698
b8d838e
05ec35b
cf854a1
76fbf0f
246f45f
607b82d
0a9638a
9e5c270
f7a924c
e331295
9fa9146
f63bc09
23bafa7
6280ca2
8fcb4b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,198 @@ | ||||||
| import { | ||||||
harsh-akamai marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| useAllMarketplacePartnersMapQuery, | ||||||
| useAllMarketplaceTypesMapQuery, | ||||||
| useInfiniteMarketplaceProductsQuery, | ||||||
| } from '@linode/queries'; | ||||||
| import { useTheme } from '@linode/ui'; | ||||||
| import { useNavigate } from '@tanstack/react-router'; | ||||||
| import * as React from 'react'; | ||||||
|
|
||||||
| import { getAPIErrorOrDefault } from 'src/utilities/errorUtils'; | ||||||
|
|
||||||
| import { useIsMarketplaceV2Enabled } from '../utils'; | ||||||
| import { CategorySectionView } from './CategorySectionView'; | ||||||
|
|
||||||
| import type { ProductCardData } from './ProductSelectionCard'; | ||||||
| import type { Filter, MarketplaceCategory } from '@linode/api-v4'; | ||||||
|
|
||||||
| const INITIAL_DISPLAY_COUNT = 6; | ||||||
| const LOAD_MORE_INCREMENT = 6; | ||||||
|
|
||||||
| export interface GlobalFilters { | ||||||
| categortId?: number; | ||||||
|
||||||
| categortId?: number; | |
| categoryId?: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Addressed this. I've also added the unit tests π
harsh-akamai marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering if we should also add a hasNextPage check from useInfiniteMarketplaceProductsQuery
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
products.length < category.products_count;
This check covers the hasNextPage check
Uh oh!
There was an error while loading. Please reload this page.