2
0

fix(results): 🐛 Export all for free users

This commit is contained in:
Baptiste Arnaud
2022-04-12 13:55:44 -05:00
parent 348055d68a
commit df3e92685e
2 changed files with 4 additions and 2 deletions

View File

@ -38,6 +38,7 @@ export const UnlockProPlanInfo = ({
bgColor={'blue.50'}
rounded="md"
justifyContent="space-between"
flexShrink={0}
>
<HStack>
<AlertIcon />

View File

@ -98,7 +98,8 @@ export const SubmissionsContent = ({
const handleExportSelection = async () => {
setIsExportLoading(true)
const isSelectAll = totalSelected === totalResults
const isSelectAll =
totalSelected === totalResults - (totalHiddenResults ?? 0)
const dataToUnparse = isSelectAll
? await getAllTableData()
: tableData.filter((_, idx) => selectedIndices.includes(idx))
@ -145,7 +146,7 @@ export const SubmissionsContent = ({
}
return (
<Stack maxW="1200px" w="full" pb="28" px={['4', '0']}>
<Stack maxW="1200px" w="full" pb="28" px={['4', '0']} spacing="4">
{totalHiddenResults && (
<UnlockProPlanInfo
buttonLabel={`Unlock ${totalHiddenResults} results`}