mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-09-17 04:59:34 +02:00
refactor: optimize imports
This commit is contained in:
@@ -8,12 +8,11 @@ import MenuIcon from '@mui/icons-material/Menu';
|
|||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
import githubIcon from '@assets/github-mark.png'; // Adjust the path to your GitHub icon
|
import githubIcon from '@assets/github-mark.png'; // Adjust the path to your GitHub icon
|
||||||
import {
|
import {
|
||||||
Stack,
|
|
||||||
Drawer,
|
Drawer,
|
||||||
List,
|
List,
|
||||||
ListItem,
|
ListItemButton,
|
||||||
ListItemText,
|
ListItemText,
|
||||||
ListItemButton
|
Stack
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import useMediaQuery from '@mui/material/useMediaQuery';
|
import useMediaQuery from '@mui/material/useMediaQuery';
|
||||||
import { useTheme } from '@mui/material/styles';
|
import { useTheme } from '@mui/material/styles';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Button, Box, Stack } from '@mui/material';
|
import { Box, Button } from '@mui/material';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import ToolBreadcrumb from './ToolBreadcrumb';
|
import ToolBreadcrumb from './ToolBreadcrumb';
|
||||||
import { capitalizeFirstLetter } from '../utils/string';
|
import { capitalizeFirstLetter } from '../utils/string';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Box, Link, Card, CardContent, Typography } from '@mui/material';
|
import { Box, Card, CardContent, Link, Typography } from '@mui/material';
|
||||||
import { ToolCardProps } from './AllTools';
|
import { ToolCardProps } from './AllTools';
|
||||||
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import { ExampleCardProps } from './Examples';
|
import { ExampleCardProps } from './Examples';
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
Stack,
|
|
||||||
Card,
|
Card,
|
||||||
CardContent,
|
CardContent,
|
||||||
Typography,
|
Stack,
|
||||||
TextField,
|
TextField,
|
||||||
|
Typography,
|
||||||
useTheme
|
useTheme
|
||||||
} from '@mui/material';
|
} from '@mui/material';
|
||||||
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
import ArrowDownwardIcon from '@mui/icons-material/ArrowDownward';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Box, styled, TextField, useTheme } from '@mui/material';
|
import { Box, useTheme } from '@mui/material';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import React, { useContext, useEffect, useRef, useState } from 'react';
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||||
import InputHeader from '../InputHeader';
|
import InputHeader from '../InputHeader';
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
import { Box, Stack, TextField } from '@mui/material';
|
import { Box, TextField } from '@mui/material';
|
||||||
import Typography from '@mui/material/Typography';
|
|
||||||
import Button from '@mui/material/Button';
|
|
||||||
import PublishIcon from '@mui/icons-material/Publish';
|
|
||||||
import ContentPasteIcon from '@mui/icons-material/ContentPaste';
|
|
||||||
import React, { useContext, useRef } from 'react';
|
import React, { useContext, useRef } from 'react';
|
||||||
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
|
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
|
||||||
import InputHeader from '../InputHeader';
|
import InputHeader from '../InputHeader';
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import React, { useState, ChangeEvent, useRef } from 'react';
|
import React, { ChangeEvent, useRef, useState } from 'react';
|
||||||
import { Box, Stack, TextField } from '@mui/material';
|
import { Box, Stack, TextField } from '@mui/material';
|
||||||
import PaletteIcon from '@mui/icons-material/Palette';
|
import PaletteIcon from '@mui/icons-material/Palette';
|
||||||
import IconButton from '@mui/material/IconButton';
|
import IconButton from '@mui/material/IconButton';
|
||||||
|
@@ -1,10 +1,6 @@
|
|||||||
import { SplitOperatorType } from '../../pages/string/split/service';
|
import { Box } from '@mui/material';
|
||||||
import { Box, Stack } from '@mui/material';
|
|
||||||
import { Field } from 'formik';
|
|
||||||
import Typography from '@mui/material/Typography';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import TextFieldWithDesc from './TextFieldWithDesc';
|
import TextFieldWithDesc from './TextFieldWithDesc';
|
||||||
import { globalDescriptionFontSize } from '../../config/uiConfig';
|
|
||||||
import SimpleRadio from './SimpleRadio';
|
import SimpleRadio from './SimpleRadio';
|
||||||
|
|
||||||
const RadioWithTextField = <T,>({
|
const RadioWithTextField = <T,>({
|
||||||
|
@@ -1,8 +1,4 @@
|
|||||||
import Typography from '@mui/material/Typography';
|
import { Box, TextField } from '@mui/material';
|
||||||
import { Box, Stack, TextField } from '@mui/material';
|
|
||||||
import Button from '@mui/material/Button';
|
|
||||||
import DownloadIcon from '@mui/icons-material/Download';
|
|
||||||
import ContentPasteIcon from '@mui/icons-material/ContentPaste';
|
|
||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
|
import { CustomSnackBarContext } from '../../contexts/CustomSnackBarContext';
|
||||||
import InputHeader from '../InputHeader';
|
import InputHeader from '../InputHeader';
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import { RouteObject } from 'react-router-dom';
|
import { Navigate, RouteObject } from 'react-router-dom';
|
||||||
import { Navigate } from 'react-router-dom';
|
|
||||||
import { lazy } from 'react';
|
import { lazy } from 'react';
|
||||||
|
|
||||||
const Home = lazy(() => import('../pages/home'));
|
const Home = lazy(() => import('../pages/home'));
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { Box, Card, CardContent, Stack } from '@mui/material';
|
import { Box, Card, CardContent } from '@mui/material';
|
||||||
import Grid from '@mui/material/Grid';
|
import Grid from '@mui/material/Grid';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { Link, useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// Import necessary modules and functions
|
// Import necessary modules and functions
|
||||||
import { describe, it, expect } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { listOfIntegers } from './service';
|
import { listOfIntegers } from './service';
|
||||||
|
|
||||||
// Define test cases for the listOfIntegers function
|
// Define test cases for the listOfIntegers function
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { compute } from './service';
|
import { compute } from './service';
|
||||||
|
|
||||||
describe('compute function', () => {
|
describe('compute function', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { test, expect } from '@playwright/test';
|
import { expect, test } from '@playwright/test';
|
||||||
|
|
||||||
test.describe('JoinText Component', () => {
|
test.describe('JoinText Component', () => {
|
||||||
test.beforeEach(async ({ page }) => {
|
test.beforeEach(async ({ page }) => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { mergeText } from './service';
|
import { mergeText } from './service';
|
||||||
|
|
||||||
describe('mergeText', () => {
|
describe('mergeText', () => {
|
||||||
|
@@ -1,18 +1,13 @@
|
|||||||
import { Box, Stack } from '@mui/material';
|
import { Box } from '@mui/material';
|
||||||
import Grid from '@mui/material/Grid';
|
import React, { useState } from 'react';
|
||||||
import React, { useContext, useEffect, useState } from 'react';
|
|
||||||
import ToolTextInput from '../../../components/input/ToolTextInput';
|
import ToolTextInput from '../../../components/input/ToolTextInput';
|
||||||
import ToolTextResult from '../../../components/result/ToolTextResult';
|
import ToolTextResult from '../../../components/result/ToolTextResult';
|
||||||
import { Formik, useFormikContext } from 'formik';
|
|
||||||
import * as Yup from 'yup';
|
import * as Yup from 'yup';
|
||||||
import ToolOptions from '../../../components/options/ToolOptions';
|
import ToolOptions from '../../../components/options/ToolOptions';
|
||||||
import { compute, SplitOperatorType } from './service';
|
import { compute, SplitOperatorType } from './service';
|
||||||
import { CustomSnackBarContext } from '../../../contexts/CustomSnackBarContext';
|
|
||||||
import RadioWithTextField from '../../../components/options/RadioWithTextField';
|
import RadioWithTextField from '../../../components/options/RadioWithTextField';
|
||||||
import TextFieldWithDesc from '../../../components/options/TextFieldWithDesc';
|
import TextFieldWithDesc from '../../../components/options/TextFieldWithDesc';
|
||||||
import ToolOptionGroups from '../../../components/options/ToolOptionGroups';
|
|
||||||
import ToolInputAndResult from '../../../components/ToolInputAndResult';
|
import ToolInputAndResult from '../../../components/ToolInputAndResult';
|
||||||
import CheckboxWithDesc from '../../../components/options/CheckboxWithDesc';
|
|
||||||
|
|
||||||
const initialValues = {
|
const initialValues = {
|
||||||
splitSeparatorType: 'symbol' as SplitOperatorType,
|
splitSeparatorType: 'symbol' as SplitOperatorType,
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { compute } from './service';
|
import { compute } from './service';
|
||||||
|
|
||||||
describe('compute function', () => {
|
describe('compute function', () => {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
import { describe, it, expect } from 'vitest';
|
import { describe, expect, it } from 'vitest';
|
||||||
import { compute } from './service';
|
import { compute } from './service';
|
||||||
|
|
||||||
describe('compute function', () => {
|
describe('compute function', () => {
|
||||||
|
@@ -1,18 +1,9 @@
|
|||||||
import {
|
import { Box, Divider, Stack, useTheme } from '@mui/material';
|
||||||
Box,
|
|
||||||
Card,
|
|
||||||
CardContent,
|
|
||||||
Divider,
|
|
||||||
Stack,
|
|
||||||
useTheme
|
|
||||||
} from '@mui/material';
|
|
||||||
import Grid from '@mui/material/Grid';
|
import Grid from '@mui/material/Grid';
|
||||||
import Typography from '@mui/material/Typography';
|
import Typography from '@mui/material/Typography';
|
||||||
import { Link, useNavigate, useParams } from 'react-router-dom';
|
import { Link, useNavigate, useParams } from 'react-router-dom';
|
||||||
import { getToolsByCategory, tools } from '../../tools';
|
import { getToolsByCategory } from '../../tools';
|
||||||
import Button from '@mui/material/Button';
|
|
||||||
import Hero from 'components/Hero';
|
import Hero from 'components/Hero';
|
||||||
import AllTools from '../../components/allTools/AllTools';
|
|
||||||
import { capitalizeFirstLetter } from '../../utils/string';
|
import { capitalizeFirstLetter } from '../../utils/string';
|
||||||
import toolsPng from '@assets/tools.png';
|
import toolsPng from '@assets/tools.png';
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import ToolLayout from '../components/ToolLayout';
|
import ToolLayout from '../components/ToolLayout';
|
||||||
import React, { LazyExoticComponent, JSXElementConstructor } from 'react';
|
import React, { JSXElementConstructor, LazyExoticComponent } from 'react';
|
||||||
|
|
||||||
interface ToolOptions {
|
interface ToolOptions {
|
||||||
path: string;
|
path: string;
|
||||||
|
Reference in New Issue
Block a user