-
Notifications
You must be signed in to change notification settings - Fork 59
Fix/mm2 1318: Typescript errors pt 3 #205
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…typescript-errors-pt-3
src/hooks/api/products.tsx
Outdated
| const limitedProducts = filter?.limit | ||
| ? products.slice(0, filter.limit) | ||
| : products | ||
|
|
||
| return { | ||
| ...data, | ||
| products: productsImagesFormatter(products?.slice(0, filter?.limit)) || [], | ||
| products: limitedProducts, |
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.
we're going to remove FE filtering, soon this will be unused
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.
Removed
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.
not sure if we need this on main branch
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.
Removed
fix-typescript-errors-v2.plan.md
Outdated
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.
not sure if we need this on main branch
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.
Removed
scripts/ts-check.js
Outdated
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.
not sure if we need this on main branch
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.
Removed
| } | ||
| ) | ||
|
|
||
| console.log(products,'products') |
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.
:)
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.
Removed
| const processedProducts = products?.slice(offset, offset + PAGE_SIZE) || [] | ||
| const processedCount = | ||
| count < (products?.length || 0) ? count : products?.length || 0 |
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.
you can remove this after Alan's pr is merged
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.
Removed
| ? regionsCurrencyMap[regionId as string] | ||
| : currencyCodeOrRegionId | ||
|
|
||
| let existingId: string | undefined = undefined |
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.
pls don't define anything as undefined
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.
Corrected
| return | ||
| } | ||
|
|
||
| // Create a clean payload for the API |
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.
pls remove the comment
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.
Removed
| </RouteDrawer.Header> | ||
| {!isLoading && product && ( | ||
| <ProductShippingProfileForm product={product} /> | ||
| <ProductShippingProfileForm product={product as any} /> |
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.
👀
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.
Removed as any
| } | ||
|
|
||
| function productsImagesFormatter( | ||
| products: ExtendedAdminProduct[] | ExtendedAdminProduct | undefined |
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.
how about
products?: ExtendedAdminProduct[] | ExtendedAdminProduct
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.
Corrected
The merge-base changed after approval.
Fix pt-3
MM2-1318