Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@ interface WorkspaceSelectProps {
disabled?: boolean;
onSelect: (teamId: string) => void;
selectedTeamId: string;
filterNonPro?: boolean;
}

export const WorkspaceSelect: React.FC<WorkspaceSelectProps> = React.memo(
({ disabled, onSelect, selectedTeamId }) => {
({ disabled, onSelect, selectedTeamId, filterNonPro }) => {
const state = useAppState();
const history = useHistory();
const { dashboard } = state;
Expand Down Expand Up @@ -110,7 +111,10 @@ export const WorkspaceSelect: React.FC<WorkspaceSelectProps> = React.memo(
const isProWorkspace =
team.subscription?.status === SubscriptionStatus.Active;

if (team.id !== state.activeTeam) {
const moveNotAllowed =
filterNonPro && !isProWorkspace && !team.featureFlags.friendOfCsb;

if (team.id !== state.activeTeam && moveNotAllowed) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export const MoveSandboxFolderModal: FunctionComponent = () => {
selectedTeamId={teamId}
disabled={preventSandboxLeaving}
onSelect={onWorkspaceSelect}
filterNonPro
/>
</Element>

Expand Down