feat: Application intl context provider.

This commit is contained in:
a.bouhuolia
2021-07-27 02:40:45 +02:00
parent 45ee031df1
commit 3da7b53f5e
3 changed files with 40 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ import React, { useContext } from 'react';
import classNames from 'classnames';
import { If } from 'components';
import { Skeleton } from 'components';
import { useAppIntlContext } from 'components/AppIntlProvider';
import TableContext from './TableContext';
import { isCellLoading } from './utils';
@@ -26,6 +27,9 @@ export default function TableCell({
const isExpandColumn = expandToggleColumn === index;
const { skeletonWidthMax = 100, skeletonWidthMin = 40 } = {};
// Application intl context.
const { isRTL } = useAppIntlContext();
// Detarmines whether the current cell is loading.
const cellLoading = isCellLoading(
cellsLoading,
@@ -46,8 +50,6 @@ export default function TableCell({
);
}
const isRTL = true;
return (
<div
{...cell.getCellProps({