Skip to content
Merged
Changes from all 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
37 changes: 20 additions & 17 deletions src/pages/WorkspaceSwitcherPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import OptionsSelector from '@components/OptionsSelector';
import PressableWithFeedback from '@components/Pressable/PressableWithFeedback';
import ScreenWrapper from '@components/ScreenWrapper';
import Text from '@components/Text';
import Tooltip from '@components/Tooltip';
import useActiveWorkspace from '@hooks/useActiveWorkspace';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
Expand Down Expand Up @@ -212,23 +213,25 @@ function WorkspaceSwitcherPage({policies}: WorkspaceSwitcherPageProps) {
{translate('common.workspaces')}
</Text>
</View>
<PressableWithFeedback
accessible={false}
role={CONST.ROLE.BUTTON}
onPress={() => {
App.createWorkspaceWithPolicyDraftAndNavigateToIt();
}}
>
{({hovered}) => (
<Icon
src={Expensicons.Plus}
width={12}
height={12}
additionalStyles={[styles.buttonDefaultBG, styles.borderRadiusNormal, styles.p2, hovered && styles.buttonHoveredBG]}
fill={theme.icon}
/>
)}
</PressableWithFeedback>
<Tooltip text={translate('workspace.new.newWorkspace')}>
<PressableWithFeedback
accessible={false}
role={CONST.ROLE.BUTTON}
onPress={() => {
App.createWorkspaceWithPolicyDraftAndNavigateToIt();
}}
>
{({hovered}) => (
<Icon
src={Expensicons.Plus}
width={12}
height={12}
additionalStyles={[styles.buttonDefaultBG, styles.borderRadiusNormal, styles.p2, hovered && styles.buttonHoveredBG]}
fill={theme.icon}
/>
)}
</PressableWithFeedback>
</Tooltip>
</View>

{usersWorkspaces.length > 0 ? (
Expand Down