Skip to content

Commit

Permalink
Feat: import/export in the Safe List sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Jul 21, 2023
1 parent 327b4cd commit 423fbac
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/settings/DataManagement/ImportFileUpload.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export const ImportFileUpload = ({

return (
<>
<Typography>Import {'Safe{Wallet}'} data by clicking or dragging a file below.</Typography>
<Typography>Import {'Safe{Wallet}'} data by uploading a file in the area below.</Typography>

<FileUpload
fileType={FileTypes.JSON}
Expand All @@ -74,7 +74,7 @@ export const ImportFileUpload = ({
mr: 0.5,
}}
/>
Only JSON files exported from a {'Safe{Wallet}'} can be imported.
Only JSON files exported from the {'Safe{Wallet}'} can be imported.
</Typography>
</>
)
Expand Down
3 changes: 3 additions & 0 deletions src/components/sidebar/Sidebar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import SidebarFooter from '@/components/sidebar/SidebarFooter'

import css from './styles.module.css'
import { trackEvent, OVERVIEW_EVENTS } from '@/services/analytics'
import { DataWidget } from '@/components/welcome/DataWidget'

const Sidebar = (): ReactElement => {
const [isDrawerOpen, setIsDrawerOpen] = useState<boolean>(false)
Expand Down Expand Up @@ -53,6 +54,8 @@ const Sidebar = (): ReactElement => {
<Drawer variant="temporary" anchor="left" open={isDrawerOpen} onClose={onDrawerToggle}>
<div className={css.drawer}>
<SafeList closeDrawer={closeDrawer} />

<DataWidget />
</div>
</Drawer>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/welcome/DataWidget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const DataWidget = (): ReactElement => {
<SvgIcon component={FileIcon} inheritViewBox fontSize="small" sx={{ fill: 'none' }} />
</Box>
}
className={css.cardHeader}
title={<b>{hasData ? 'Work with your data' : 'Already have a Safe Account?'}</b>}
subheader={hasData ? 'Export or import your data' : 'Import your data'}
/>
Expand Down
4 changes: 4 additions & 0 deletions src/components/welcome/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@
padding: 0;
}

.cardHeader {
text-align: left;
}

@media (max-width: 899.95px) {
.sidebar :global .MuiPaper-root {
height: 100%;
Expand Down

0 comments on commit 423fbac

Please sign in to comment.