Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit b558c57

Browse files
committed
fix: fix lint
1 parent bdd341c commit b558c57

2 files changed

Lines changed: 16 additions & 10 deletions

File tree

customer/pages/products/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const ProductsPage: NextPage = () => {
113113
<h3 className={tw('text-lg font-semibold')}>{translation.contracts}</h3>
114114
{(contracts ?? []).length === 0 ? (
115115
<span className={tw('text-bg-gray-300')}>{translation.noContracts}</span>
116-
) : contracts.map(contract => (
116+
) : contracts!.map(contract => (
117117
<Link href={contract.url} target="_blank" key={contract.uuid}
118118
className={tw('inline-flex flex-row gap-x-2')}>
119119
{contract.key}
@@ -134,13 +134,13 @@ const ProductsPage: NextPage = () => {
134134

135135
<ConfirmDialog
136136
id="cancelBooking"
137-
isOpen={cancelDialogId}
137+
isOpen={!!cancelDialogId}
138138
onConfirm={() => {
139-
cancelMutation.mutate(cancelDialogId)
140-
setCancelDialogId()
139+
cancelMutation.mutate(cancelDialogId!)
140+
setCancelDialogId(undefined)
141141
}}
142-
onBackgroundClick={() => setCancelDialogId()}
143-
onCloseClick={() => setCancelDialogId()}
142+
onBackgroundClick={() => setCancelDialogId(undefined)}
143+
onCloseClick={() => setCancelDialogId(undefined)}
144144
titleText={translation.cancelSubscription}
145145
descriptionText={translation.cancelSubscriptionDescription}
146146
confirmType="negative"

customer/pages/products/shop.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ type ProductsTranslation = {
4343
plans: string,
4444
change: string,
4545
noProducts: string,
46+
noContracts: string,
47+
lookAt: string,
4648
} & ProductPlanTranslation
4749

4850
const defaultProductsTranslations: Record<Languages, ProductsTranslation> = {
@@ -63,7 +65,9 @@ const defaultProductsTranslations: Record<Languages, ProductsTranslation> = {
6365
pay: 'Pay',
6466
plans: 'Plans',
6567
change: 'Change',
66-
noProducts: 'No Products found.'
68+
noProducts: 'No Products found.',
69+
noContracts: 'No Contracts',
70+
lookAt: 'Look at'
6771
},
6872
de: {
6973
...defaultProductPlanTranslation.de,
@@ -82,7 +86,9 @@ const defaultProductsTranslations: Record<Languages, ProductsTranslation> = {
8286
pay: 'Bezahlen',
8387
plans: 'Pläne',
8488
change: 'Wechseln',
85-
noProducts: 'Keine Produkte gefunden.'
89+
noProducts: 'Keine Produkte gefunden.',
90+
noContracts: 'Keine Verträge',
91+
lookAt: 'Anzeigen'
8692
}
8793
}
8894

@@ -111,9 +117,9 @@ const ProductShop: NextPage = () => {
111117
<span>{productModal?.description}</span>
112118
<div className={tw('flex flex-col gap-y-1')}>
113119
<h3 className={tw('text-lg font-semibold')}>{translation.contracts}</h3>
114-
{(contracts ?? []).length === 0 ? (
120+
{(contracts ?? []).length === 0 && contracts ? (
115121
<span className={tw('text-bg-gray-300')}>{translation.noContracts}</span>
116-
) : contracts.map(contract => (
122+
) : contracts!.map(contract => (
117123
<Link href={contract.url} target="_blank" key={contract.uuid} className={tw('inline-flex flex-row gap-x-2')}>
118124
{contract.key}
119125
<span className={tw('inline-flex flex-row gap-x-1/2')}>

0 commit comments

Comments
 (0)