Skip to content

Commit d88a3c9

Browse files
committed
Show "Send quick feedback" at the bottom of the free trial column
1 parent af0644d commit d88a3c9

2 files changed

Lines changed: 18 additions & 11 deletions

File tree

packages/components/src/components/cards/EmptyCards.tsx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export interface EmptyCardsProps {
6161
errorMessage?: string
6262
errorTitle?: string
6363
fetchNextPage: (() => void) | undefined
64+
footer?: React.ReactNode
6465
loadState?: EnhancedLoadState
6566
refresh: (() => void | Promise<void>) | undefined
6667
}
@@ -76,6 +77,7 @@ export const EmptyCards = React.memo((props: EmptyCardsProps) => {
7677
errorMessage,
7778
errorTitle = 'Something went wrong',
7879
fetchNextPage,
80+
footer,
7981
loadState: _loadStateProp,
8082
refresh,
8183
} = props
@@ -156,13 +158,17 @@ export const EmptyCards = React.memo((props: EmptyCardsProps) => {
156158
}
157159

158160
return (
159-
<FullHeightScrollView
160-
style={sharedStyles.flex}
161-
contentContainerStyle={sharedStyles.center}
162-
pointerEvents="box-none"
163-
>
164-
{renderContent()}
165-
</FullHeightScrollView>
161+
<>
162+
<FullHeightScrollView
163+
style={sharedStyles.flex}
164+
contentContainerStyle={sharedStyles.center}
165+
pointerEvents="box-none"
166+
>
167+
{renderContent()}
168+
</FullHeightScrollView>
169+
170+
{footer}
171+
</>
166172
)
167173
})
168174

packages/components/src/hooks/use-cards-props.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,15 +378,16 @@ export function useCardsProps<ItemT extends EnhancedItem>({
378378
)
379379
}}
380380
/>
381-
382-
<Spacer height={contentPadding} />
383-
384-
<QuickFeedbackRow />
385381
</View>
386382
}
387383
errorMessage="You need a paid plan to keep using DevHub."
388384
errorTitle="Free trial expired"
389385
fetchNextPage={undefined}
386+
footer={
387+
<View style={sharedStyles.padding}>
388+
<QuickFeedbackRow />
389+
</View>
390+
}
390391
loadState="error"
391392
refresh={undefined}
392393
/>

0 commit comments

Comments
 (0)