Layout, Pages, Dashboard, MUI

This commit is contained in:
cracklesparkle
2024-06-20 16:59:59 +09:00
parent d53694a0b3
commit d6906503d1
27 changed files with 8076 additions and 142 deletions

View File

@ -1,30 +1,18 @@
# React + TypeScript + Vite
# Experimental Frontend
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
## Структура проекта
- `src/assets/` - Статические ассеты
- `src/components/` - Компоненты
- `src/constants/` - Константы
- `src/layouts/` - Макеты для разных частей, пока есть MainLayout, используемый всеми роутами
- `src/pages/` - Страницы
- `src/services/` - сервисы / API
Currently, two official plugins are available:
## UI
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
В основном, используется Material UI https://mui.com/material-ui
Для кастомных компонентов следует создать директорию в `src/components/НазваниеКомпонента` со стилями, если необходимо
## Expanding the ESLint configuration
## Env vars
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level `parserOptions` property like this:
```js
export default {
// other rules...
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
}
```
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
`.env.example` должен описывать используемые переменные, в работе же используется `.env.local` или `.env`