Skip to content

Commit

Permalink
Add export statement for personal wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
mikozet committed Sep 22, 2023
1 parent eba3179 commit 324820d
Showing 1 changed file with 13 additions and 20 deletions.
33 changes: 13 additions & 20 deletions src/components/ActivityStreamWithTabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import DialogExportStatement from '~/components/DialogExportStatement';
import Popover from '~/components/Popover';
import TabNavigation from '~/components/TabNavigation';
import TabNavigationAction from '~/components/TabNavigationAction';
import { useIsOrganization } from '~/hooks/username';
import core from '~/services/core';
import translate from '~/services/locale';
import { loadMoreActivities, updateLastSeen } from '~/store/activity/actions';
Expand Down Expand Up @@ -106,8 +105,6 @@ const ActivityStreamWithTabs = ({ basePath = ACTIVITIES_PATH }) => {
const [filterTitle, setFilterTitle] = useState(filterItems[0].title);
const [anchorEl, setAnchorEl] = useState(null);
const { categories, lastSeenAt } = useSelector((state) => state.activity);
const safeAddress = useSelector((state) => state.safe.currentAccount);
const { isOrganization } = useIsOrganization(safeAddress);

// Get only new Activities and segregate them by category
const newActivities = CATEGORIES.reduceRight((newActivities, category) => {
Expand Down Expand Up @@ -269,23 +266,19 @@ const ActivityStreamWithTabs = ({ basePath = ACTIVITIES_PATH }) => {
})}
</Popover>
</Box>
{selectedCategory === ActivityFilterTypes.TRANSFERS &&
isOrganization && (
<>
<Box className={classes.exportContainer}>
<ButtonIcon
icon="IconUnion"
onClick={exportStatementBtnHandler}
>
{translate('ExportStatement.exportBtnText')}
</ButtonIcon>
</Box>
<DialogExportStatement
dialogOpen={dialogOpen}
onCloseHandler={dialogCloseHandler}
/>
</>
)}
{selectedCategory === ActivityFilterTypes.TRANSFERS && (
<>
<Box className={classes.exportContainer}>
<ButtonIcon icon="IconUnion" onClick={exportStatementBtnHandler}>
{translate('ExportStatement.exportBtnText')}
</ButtonIcon>
</Box>
<DialogExportStatement
dialogOpen={dialogOpen}
onCloseHandler={dialogCloseHandler}
/>
</>
)}
</Box>
<ActivityStream
activities={activity.activities}
Expand Down

0 comments on commit 324820d

Please sign in to comment.