Files
tm_panel/package.json
T
AmirReza Jamali e6493f5d83 feat(form): add loading state and replace custom switch component
This commit introduces a loading state for form submissions and replaces the custom switch component with a third-party library for improved user experience and maintainability.

- Adds `react-switch` as a dependency to replace the custom-built switch component, providing a more robust and feature-rich solution.
- Implements a loading indicator on form submission buttons and in the confirmation modal by utilizing the `useIsMutating` hook from TanStack Query. This provides clear visual feedback to the user during asynchronous operations.
- Creates a reusable `FormFooter` component to encapsulate the submit and cancel buttons, centralizing the form submission logic and loading state.
- Refactors the company create/edit forms to use the new `FormFooter` and `react-switch` components.
- Moves the `BreadcrumbItem` type to a shared types file for better code organization.
2025-09-20 16:13:04 +03:30

53 lines
1.3 KiB
JSON

{
"name": "free-nextadmin-nextjs",
"version": "1.2.1",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@tanstack/react-query": "^5.85.6",
"@types/js-cookie": "^3.0.6",
"@types/react-paginate": "^7.1.4",
"apexcharts": "^4.5.0",
"axios": "^1.11.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"currency-symbol-map": "^5.1.0",
"dayjs": "^1.11.13",
"flatpickr": "^4.6.13",
"js-cookie": "^3.0.5",
"jsvectormap": "^1.6.0",
"moment": "^2.30.1",
"next": "15.1.6",
"next-themes": "^0.4.4",
"nextjs-toploader": "^3.7.15",
"react": "19.0.0",
"react-apexcharts": "^1.7.0",
"react-dom": "19.0.0",
"react-hook-form": "^7.62.0",
"react-intersection-observer": "^9.16.0",
"react-paginate": "^8.3.0",
"react-switch": "^7.1.0",
"react-toastify": "^11.0.5",
"tailwind-merge": "^2.6.0",
"zod": "^4.1.5"
},
"devDependencies": {
"@types/node": "^22",
"@types/react": "19.0.8",
"@types/react-dom": "19.0.3",
"autoprefixer": "^10.4.20",
"eslint": "^9",
"eslint-config-next": "15.1.6",
"postcss": "^8",
"prettier": "^3.4.2",
"prettier-plugin-tailwindcss": "^0.6.11",
"tailwindcss": "^3.4.16",
"typescript": "^5"
}
}