forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
170 additions
and
41 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
assets/images/simple-illustrations/simple-illustration__hotdogstand.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import PropTypes from 'prop-types'; | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import Icon from '@components/Icon'; | ||
import sourcePropTypes from '@components/Image/sourcePropTypes'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
||
const iconSectionPropTypes = { | ||
icon: sourcePropTypes, | ||
IconComponent: PropTypes.IconComponent, | ||
iconContainerStyles: PropTypes.iconContainerStyles, | ||
}; | ||
|
||
const defaultIconSectionPropTypes = { | ||
icon: null, | ||
IconComponent: null, | ||
iconContainerStyles: [], | ||
}; | ||
|
||
function IconSection({icon, IconComponent, iconContainerStyles}) { | ||
const styles = useThemeStyles(); | ||
|
||
return ( | ||
<View style={[styles.flexGrow1, styles.flexRow, styles.justifyContentEnd, ...iconContainerStyles]}> | ||
{Boolean(icon) && ( | ||
<Icon | ||
src={icon} | ||
height={68} | ||
width={68} | ||
/> | ||
)} | ||
{Boolean(IconComponent) && <IconComponent />} | ||
</View> | ||
); | ||
} | ||
|
||
IconSection.displayName = 'IconSection'; | ||
IconSection.propTypes = iconSectionPropTypes; | ||
IconSection.defaultProps = defaultIconSectionPropTypes; | ||
|
||
export default IconSection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import ROUTES from '@src/ROUTES'; | ||
|
||
export default function shouldSkipDeepLinkNavigation(route: string) { | ||
// When deep-linking to desktop app with `transition` route we don't want to call navigate | ||
// on the route because it will display an infinite loading indicator. | ||
// See issue: https://github.com/Expensify/App/issues/33149 | ||
if (route.includes(ROUTES.TRANSITION_BETWEEN_APPS)) { | ||
return true; | ||
} | ||
|
||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
export default function shouldSkipDeepLinkNavigation(route: string) { | ||
// no-op for all other platforms | ||
return false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/pages/workspace/card/WorkspaceCardCreateAWorkspace.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import Button from '@components/Button'; | ||
import * as Illustrations from '@components/Icon/Illustrations'; | ||
import Section, {CARD_LAYOUT} from '@components/Section'; | ||
import useLocalize from '@hooks/useLocalize'; | ||
import useThemeStyles from '@hooks/useThemeStyles'; | ||
|
||
function WorkspaceCardCreateAWorkspace() { | ||
const styles = useThemeStyles(); | ||
const {translate} = useLocalize(); | ||
|
||
return ( | ||
<Section | ||
title={translate('workspace.emptyWorkspace.title')} | ||
icon={Illustrations.HotDogStand} | ||
cardLayout={CARD_LAYOUT.ICON_ON_TOP} | ||
subtitle={translate('workspace.emptyWorkspace.subtitle')} | ||
subtitleMuted | ||
containerStyles={[styles.highlightBG]} | ||
> | ||
<Button | ||
text={translate('workspace.emptyWorkspace.createAWorkspaceCTA')} | ||
style={styles.mt5} | ||
success | ||
medium | ||
/> | ||
</Section> | ||
); | ||
} | ||
|
||
WorkspaceCardCreateAWorkspace.displayName = 'WorkspaceCardNoVBAView'; | ||
|
||
export default WorkspaceCardCreateAWorkspace; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters