Fix batch migration arrow rtl icon

This commit is contained in:
schroda
2026-07-11 00:18:57 +02:00
parent 727b4dc645
commit 52ab628f9c

View File

@@ -11,11 +11,13 @@ import { MigrationEntryStatus } from '@/features/migration/Migration.types.ts';
import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx'; import { LoadingPlaceholder } from '@/base/components/feedback/LoadingPlaceholder.tsx';
import Box from '@mui/material/Box'; import Box from '@mui/material/Box';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward'; import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import type { ReactNode } from 'react'; import type { ReactNode } from 'react';
import type { Theme } from '@mui/material/styles'; import { type Theme } from '@mui/material/styles';
import type { SystemCssProperties } from '@mui/system/styleFunctionSx'; import type { SystemCssProperties } from '@mui/system/styleFunctionSx';
import PriorityHighIcon from '@mui/icons-material/PriorityHigh'; import PriorityHighIcon from '@mui/icons-material/PriorityHigh';
import CheckIcon from '@mui/icons-material/Check'; import CheckIcon from '@mui/icons-material/Check';
import { useGetOptionForDirection } from '@/features/theme/services/ThemeCreator.ts';
const StatusIndicatorWrapper = ({ const StatusIndicatorWrapper = ({
backgroundColor, backgroundColor,
@@ -48,6 +50,9 @@ export const MigrationEntryStatusIndicator = ({
hasResults: boolean; hasResults: boolean;
}) => { }) => {
const isTabletWidth = MediaQuery.useIsTabletWidth(); const isTabletWidth = MediaQuery.useIsTabletWidth();
const getOptionForDirection = useGetOptionForDirection();
const ArrowIcon = getOptionForDirection(ArrowForwardIcon, ArrowBackIcon);
if ([MigrationEntryStatus.SEARCHING, MigrationEntryStatus.MIGRATING].includes(status)) { if ([MigrationEntryStatus.SEARCHING, MigrationEntryStatus.MIGRATING].includes(status)) {
return <LoadingPlaceholder size={isTabletWidth ? 22 : 32} />; return <LoadingPlaceholder size={isTabletWidth ? 22 : 32} />;
@@ -97,10 +102,7 @@ export const MigrationEntryStatusIndicator = ({
<StatusIndicatorWrapper <StatusIndicatorWrapper
backgroundColor="primary.dark" backgroundColor="primary.dark"
statusIcon={ statusIcon={
<ArrowForwardIcon <ArrowIcon fontSize={isTabletWidth ? undefined : 'large'} sx={{ color: 'primary.contrastText' }} />
fontSize={isTabletWidth ? undefined : 'large'}
sx={{ color: 'primary.contrastText' }}
/>
} }
/> />
); );