From e42d950ce0c0a5eb1f3fb8506a79067d9bfa9f75 Mon Sep 17 00:00:00 2001 From: Matheus Izidio Date: Wed, 17 Aug 2022 14:48:46 -0300 Subject: [PATCH 1/5] remove comments --- .../components/admin/commissions/EditCommissionModal.tsx | 1 - .../components/admin/dashboard/AffiliateOrdersTable.tsx | 9 --------- 2 files changed, 10 deletions(-) diff --git a/react/components/admin/commissions/EditCommissionModal.tsx b/react/components/admin/commissions/EditCommissionModal.tsx index e9cf1e8..34af532 100644 --- a/react/components/admin/commissions/EditCommissionModal.tsx +++ b/react/components/admin/commissions/EditCommissionModal.tsx @@ -97,7 +97,6 @@ const EditCommissionModal: FC = ({ suffix="%" value={commissionInput} onChange={onCommissionInputChange} - // tone={commissionInputError.tone} errorText={commissionInputError.message} /> diff --git a/react/components/admin/dashboard/AffiliateOrdersTable.tsx b/react/components/admin/dashboard/AffiliateOrdersTable.tsx index eca787e..4807922 100644 --- a/react/components/admin/dashboard/AffiliateOrdersTable.tsx +++ b/react/components/admin/dashboard/AffiliateOrdersTable.tsx @@ -1,7 +1,6 @@ import type { TableColumn, UseSortReturn } from '@vtex/admin-ui' import { Flex, - // Select, useQuerySearchState, Search, Table, @@ -390,14 +389,6 @@ const AffiliateOrdersTable: FC = () => { view, }) - // const handleSelectChange = useCallback( - // (event: React.ChangeEvent) => { - // setStatusFilter(event.target.value) - // setQuery({ ...query, status: event.target.value }) - // }, - // [setStatusFilter, setQuery, query] - // ) - const handleStartDateChange = useCallback( (date: Date) => { setStartDate(date) From f6fc648b285a6151885d970578bfaf68418c234c Mon Sep 17 00:00:00 2001 From: GabrielBarros Date: Thu, 18 Aug 2022 16:32:59 -0300 Subject: [PATCH 2/5] UseMemo and React.FC Type fix --- react/AffiliateProfileValidator.tsx | 17 +++++++++++------ react/AffiliateValidator.tsx | 4 ++-- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/react/AffiliateProfileValidator.tsx b/react/AffiliateProfileValidator.tsx index 03dc2f0..3cb7bea 100644 --- a/react/AffiliateProfileValidator.tsx +++ b/react/AffiliateProfileValidator.tsx @@ -7,8 +7,8 @@ import useAffiliate from './context/useAffiliate' import { getSlugStoreFront } from './utils/shared' type Props = { - Invalid: React.ComponentType - Valid: React.ComponentType + Invalid: React.FC + Valid: React.FC } const AffiliateProfileValidator: FC = ({ Valid, Invalid }) => { @@ -19,11 +19,16 @@ const AffiliateProfileValidator: FC = ({ Valid, Invalid }) => { const { orderForm } = useOrderForm() - const loading = - orderForm?.clientProfileData === undefined || - affiliate.affiliateOrdersLoading + const loading = useMemo(() => { + return ( + orderForm?.clientProfileData === undefined || + affiliate.affiliateOrdersLoading + ) + }, [orderForm, affiliate]) - const isValid = affiliate?.affiliate?.slug === slug + const isValid = useMemo(() => { + return affiliate?.affiliate?.slug === slug + }, [affiliate, slug]) if (loading) { return ( diff --git a/react/AffiliateValidator.tsx b/react/AffiliateValidator.tsx index 6bb73b1..9e8ac12 100644 --- a/react/AffiliateValidator.tsx +++ b/react/AffiliateValidator.tsx @@ -14,8 +14,8 @@ export type IsAffiliateValidQueryResult = { } type Props = { - Invalid: React.ComponentType - Valid: React.ComponentType + Invalid: React.FC + Valid: React.FC } const AffiliateValidator: FC = ({ Invalid, Valid }) => { From 38e9cf3edc72adf372f185737f6e65fae851ef17 Mon Sep 17 00:00:00 2001 From: GabrielBarross <53904010+GabrielBarross@users.noreply.github.com> Date: Thu, 18 Aug 2022 20:43:53 +0000 Subject: [PATCH 3/5] Release v0.57.2 --- CHANGELOG.md | 2 ++ manifest.json | 2 +- node/package.json | 2 +- react/package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4bebb45..e4bf1a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.57.2] - 2022-08-18 + ### Fixed - `Spinner` added to the loading state in the profile page diff --git a/manifest.json b/manifest.json index 3baae52..d4dbc22 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "affiliates", "vendor": "vtex", - "version": "0.57.1", + "version": "0.57.2", "title": "Affiliates", "description": "App that adds support for affiliates on IO stores", "mustUpdateAt": "2018-01-04", diff --git a/node/package.json b/node/package.json index dacef4f..7131e6d 100644 --- a/node/package.json +++ b/node/package.json @@ -34,5 +34,5 @@ "lint": "tsc --noEmit --pretty", "test": "vtex-test-tools test --collectCoverage" }, - "version": "0.57.1" + "version": "0.57.2" } diff --git a/react/package.json b/react/package.json index 0198cb2..36a95ac 100644 --- a/react/package.json +++ b/react/package.json @@ -1,6 +1,6 @@ { "name": "vtex.affiliates", - "version": "0.57.1", + "version": "0.57.2", "scripts": { "test": "vtex-test-tools test --collectCoverage" }, From e0def1f843c30f79a210440559e95f40d593e423 Mon Sep 17 00:00:00 2001 From: MIzidio <39568404+MIzidio@users.noreply.github.com> Date: Wed, 24 Aug 2022 18:16:57 +0000 Subject: [PATCH 4/5] Release v0.57.3 --- CHANGELOG.md | 2 ++ manifest.json | 2 +- node/package.json | 2 +- react/package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd86c01..d88c80f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.57.3] - 2022-08-24 + ### Changed - update `admin-ui` version to `0.132.7` diff --git a/manifest.json b/manifest.json index d4dbc22..b30473e 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "affiliates", "vendor": "vtex", - "version": "0.57.2", + "version": "0.57.3", "title": "Affiliates", "description": "App that adds support for affiliates on IO stores", "mustUpdateAt": "2018-01-04", diff --git a/node/package.json b/node/package.json index 7131e6d..8aa6ed0 100644 --- a/node/package.json +++ b/node/package.json @@ -34,5 +34,5 @@ "lint": "tsc --noEmit --pretty", "test": "vtex-test-tools test --collectCoverage" }, - "version": "0.57.2" + "version": "0.57.3" } diff --git a/react/package.json b/react/package.json index e503769..2b7601b 100644 --- a/react/package.json +++ b/react/package.json @@ -1,6 +1,6 @@ { "name": "vtex.affiliates", - "version": "0.57.2", + "version": "0.57.3", "scripts": { "test": "vtex-test-tools test --collectCoverage" }, From fe6d5afb4a11b10db714711d6fc5b67f717fc3b4 Mon Sep 17 00:00:00 2001 From: GabrielBarross <53904010+GabrielBarross@users.noreply.github.com> Date: Thu, 25 Aug 2022 13:40:22 +0000 Subject: [PATCH 5/5] Release v0.58.0 --- CHANGELOG.md | 2 ++ manifest.json | 2 +- node/package.json | 2 +- react/package.json | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce8628b..ee44ec8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +## [0.58.0] - 2022-08-25 + ## [0.57.3] - 2022-08-24 ### Changed diff --git a/manifest.json b/manifest.json index b30473e..ae3d605 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "affiliates", "vendor": "vtex", - "version": "0.57.3", + "version": "0.58.0", "title": "Affiliates", "description": "App that adds support for affiliates on IO stores", "mustUpdateAt": "2018-01-04", diff --git a/node/package.json b/node/package.json index 8aa6ed0..ccdd81c 100644 --- a/node/package.json +++ b/node/package.json @@ -34,5 +34,5 @@ "lint": "tsc --noEmit --pretty", "test": "vtex-test-tools test --collectCoverage" }, - "version": "0.57.3" + "version": "0.58.0" } diff --git a/react/package.json b/react/package.json index 2b7601b..7d2853f 100644 --- a/react/package.json +++ b/react/package.json @@ -1,6 +1,6 @@ { "name": "vtex.affiliates", - "version": "0.57.3", + "version": "0.58.0", "scripts": { "test": "vtex-test-tools test --collectCoverage" },