Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: redesign Load Safe #1405

Merged
merged 15 commits into from
Jan 2, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/common/NetworkSelector/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const NetworkSelector = (): ReactElement => {

trackEvent({ ...OVERVIEW_EVENTS.SWITCH_NETWORK, label: selectedChainId })

const shouldKeepPath = [AppRoutes.load, AppRoutes.open, AppRoutes.newSafe.create].includes(router.pathname)
const shouldKeepPath = [AppRoutes.newSafe.create, AppRoutes.newSafe.load].includes(router.pathname)

const newRoute = {
pathname: shouldKeepPath ? router.pathname : '/',
Expand Down
10 changes: 9 additions & 1 deletion src/components/common/PageLayout/SideDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ const isNewSafeRoute = (pathname: string): boolean => {
return pathname === AppRoutes.newSafe.create
}

const isLoadSafeRoute = (pathname: string): boolean => {
return pathname === AppRoutes.newSafe.load
}

const isAppShareRoute = (pathname: string): boolean => {
return pathname === AppRoutes.share.safeApp
}
Expand All @@ -36,7 +40,11 @@ const SideDrawer = ({ isOpen, onToggle }: SideDrawerProps): ReactElement => {

useEffect(() => {
const closeSidebar =
isSmallScreen || isSafeAppRoute(pathname, query) || isAppShareRoute(pathname) || isNewSafeRoute(pathname)
isSmallScreen ||
isSafeAppRoute(pathname, query) ||
isAppShareRoute(pathname) ||
isNewSafeRoute(pathname) ||
isLoadSafeRoute(pathname)
onToggle(!closeSidebar)
}, [isSmallScreen, onToggle, pathname, query])

Expand Down
57 changes: 0 additions & 57 deletions src/components/load-safe/index.tsx

This file was deleted.

96 changes: 0 additions & 96 deletions src/components/load-safe/steps/SafeOwnersStep.tsx

This file was deleted.

183 changes: 0 additions & 183 deletions src/components/load-safe/steps/SafeReviewStep.tsx

This file was deleted.

Loading