Skip to content

Commit

Permalink
fix(datatable): remove react from import Closes #1462
Browse files Browse the repository at this point in the history
  • Loading branch information
kaminderpal committed Nov 9, 2023
1 parent d476556 commit 3f306e9
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from 'react';
import { useCallback, useEffect, useState } from 'react';
import { useTheme } from '@mui/material/styles';
import { Projection } from 'ol/proj';
import { useTranslation } from 'react-i18next';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { ReactNode } from 'react';
import { GridProps, useTheme } from '@mui/material';
import { ReactNode } from 'react';
import { GridProps } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { Grid } from '@/ui';

interface DataTableGridProps extends GridProps {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useEffect, useMemo, useRef, useState } from 'react';
import { useEffect, useMemo, useRef, useState } from 'react';
import { useTranslation } from 'react-i18next';
import {
MaterialReactTable,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement } from 'react';
import { ReactElement, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { ExportToCsv } from 'export-to-csv';
import { type MRT_ColumnDef as MRTColumnDef } from 'material-react-table';
Expand All @@ -22,7 +22,7 @@ interface ExportButtonProps {
*/
function ExportButton({ rows, columns, children }: ExportButtonProps): JSX.Element {
const { t } = useTranslation<string>();
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const open = Boolean(anchorEl);

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Switch, useTheme } from '@mui/material';
import { Switch } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { Tooltip } from '@/ui';
import { getSxClasses } from './data-table-style';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { toLonLat, Projection } from 'ol/proj';
import { Geometry, Point, Polygon, LineString, MultiPoint } from 'ol/geom';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useMemo, useRef, useState, memo, ReactNode } from 'react';
import { useCallback, useEffect, useMemo, useRef, useState, memo, ReactNode } from 'react';
import { useTranslation } from 'react-i18next';
import debounce from 'lodash/debounce';
import startCase from 'lodash/startCase';
Expand Down Expand Up @@ -26,7 +26,8 @@ import {
} from 'material-react-table';
import { Projection } from 'ol/proj';
import { Extent } from 'ol/extent';
import { darken, useTheme } from '@mui/material';
import { darken } from '@mui/material';
import { useTheme } from '@mui/material/styles';
import { difference } from 'lodash';
import { getUid } from 'ol/util';
import { Box, Button, IconButton, Tooltip, ZoomInSearchIcon } from '@/ui';
Expand Down

0 comments on commit 3f306e9

Please sign in to comment.