From 3f5f8e1aaf6299e1b339cd8f99aa07c9bed20f40 Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Sat, 2 Aug 2025 12:48:02 +0330 Subject: [PATCH] fix: delete additional things --- package-lock.json | 8 ++++++++ package.json | 1 + src/App.tsx | 14 +------------- src/components/Toast.tsx | 2 +- src/features/profile/Settings.tsx | 1 - .../profile/components/setting/Setting.tsx | 2 +- vite.config.d.ts | 2 ++ vite.config.js | 12 ++++++++++++ 8 files changed, 26 insertions(+), 16 deletions(-) create mode 100644 vite.config.d.ts create mode 100644 vite.config.js diff --git a/package-lock.json b/package-lock.json index fd2c54d..fcab9b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -30,6 +30,7 @@ "@types/node": "^24.0.10", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", + "@types/stylis": "^4.2.7", "@typescript-eslint/eslint-plugin": "^8.35.1", "@typescript-eslint/parser": "^8.35.1", "@vitejs/plugin-react": "^4.5.2", @@ -1895,6 +1896,13 @@ "@types/react": "*" } }, + "node_modules/@types/stylis": { + "version": "4.2.7", + "resolved": "https://registry.npmjs.org/@types/stylis/-/stylis-4.2.7.tgz", + "integrity": "sha512-VgDNokpBoKF+wrdvhAAfS55OMQpL6QRglwTwNC3kIgBrzZxA4WsFj+2eLfEA/uMUDzBcEhYmjSbwQakn/i3ajA==", + "dev": true, + "license": "MIT" + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "8.35.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.35.1.tgz", diff --git a/package.json b/package.json index 7724dc2..3f7bdc0 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@types/node": "^24.0.10", "@types/react": "^19.1.8", "@types/react-dom": "^19.1.6", + "@types/stylis": "^4.2.7", "@typescript-eslint/eslint-plugin": "^8.35.1", "@typescript-eslint/parser": "^8.35.1", "@vitejs/plugin-react": "^4.5.2", diff --git a/src/App.tsx b/src/App.tsx index 56e8e0a..50ac647 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,20 +1,9 @@ -import { - Alert, - Box, - CssBaseline, - TextField, - Typography, - useColorScheme, -} from '@mui/material'; +import { CssBaseline, useColorScheme } from '@mui/material'; import './App.css'; -import { useTranslation } from 'react-i18next'; import { LanguageManager } from './components/LanguageManager'; import { Settings } from './features/profile/Settings'; -import { Setting } from './features/profile/components/setting/Setting'; function App() { - const { t } = useTranslation(); - return ( <> @@ -56,7 +45,6 @@ function App() { export default App; import { Button } from '@mui/material'; -import { Avalanche } from 'iconsax-react'; export const ThemeToggleButton = () => { const { mode, setMode } = useColorScheme(); diff --git a/src/components/Toast.tsx b/src/components/Toast.tsx index 947194f..713c36f 100644 --- a/src/components/Toast.tsx +++ b/src/components/Toast.tsx @@ -1,5 +1,5 @@ import { Alert, Snackbar, type AlertColor } from '@mui/material'; -import React, { type PropsWithChildren } from 'react'; +import { type PropsWithChildren } from 'react'; export interface ToastProps extends PropsWithChildren { color: AlertColor | undefined; diff --git a/src/features/profile/Settings.tsx b/src/features/profile/Settings.tsx index 27bdb53..269f01f 100644 --- a/src/features/profile/Settings.tsx +++ b/src/features/profile/Settings.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { createBrowserRouter, RouterProvider, diff --git a/src/features/profile/components/setting/Setting.tsx b/src/features/profile/components/setting/Setting.tsx index 850d1cd..9776049 100644 --- a/src/features/profile/components/setting/Setting.tsx +++ b/src/features/profile/components/setting/Setting.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import { useState } from 'react'; import { Box, Typography, diff --git a/vite.config.d.ts b/vite.config.d.ts new file mode 100644 index 0000000..340562a --- /dev/null +++ b/vite.config.d.ts @@ -0,0 +1,2 @@ +declare const _default: import("vite").UserConfig; +export default _default; diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..70ef262 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,12 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +import path from 'path'; +// https://vite.dev/config/ +export default defineConfig({ + plugins: [react()], + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + }, + }, +});