fix: unused import / params for build
This commit is contained in:
parent
77c4b0cb1a
commit
fe41e1e45a
|
|
@ -1,2 +1,2 @@
|
|||
VITE_API_URL="http://localhost:8000"
|
||||
VITE_APP_KEY="123456"
|
||||
VITE_APP_KEY="4ae931db63f0d18f5082781be5e2c622"
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource/public-sans": "^5.1.2",
|
||||
"@mui/icons-material": "^6.4.3",
|
||||
"@mui/lab": "^6.0.0-beta.27",
|
||||
"@mui/material": "^6.4.3",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
"axios": "^1.7.9",
|
||||
|
|
@ -26,6 +27,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/lodash": "^4.17.15",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
|
|
@ -997,6 +1000,40 @@
|
|||
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/core": {
|
||||
"version": "1.6.9",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.9.tgz",
|
||||
"integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==",
|
||||
"dependencies": {
|
||||
"@floating-ui/utils": "^0.2.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/dom": {
|
||||
"version": "1.6.13",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz",
|
||||
"integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==",
|
||||
"dependencies": {
|
||||
"@floating-ui/core": "^1.6.0",
|
||||
"@floating-ui/utils": "^0.2.9"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/react-dom": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.1.2.tgz",
|
||||
"integrity": "sha512-06okr5cgPzMNBy+Ycse2A6udMi4bqwW/zgBF/rwjcNqWkyr82Mcg8b0vjX8OJpZFy/FKjJmw6wV7t44kK6kW7A==",
|
||||
"dependencies": {
|
||||
"@floating-ui/dom": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": ">=16.8.0",
|
||||
"react-dom": ">=16.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@floating-ui/utils": {
|
||||
"version": "0.2.9",
|
||||
"resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz",
|
||||
"integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg=="
|
||||
},
|
||||
"node_modules/@fontsource/public-sans": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource/public-sans/-/public-sans-5.1.2.tgz",
|
||||
|
|
@ -1106,10 +1143,42 @@
|
|||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/base": {
|
||||
"version": "5.0.0-beta.69",
|
||||
"resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.69.tgz",
|
||||
"integrity": "sha512-r2YyGUXpZxj8rLAlbjp1x2BnMERTZ/dMqd9cClKj2OJ7ALAuiv/9X5E9eHfRc9o/dGRuLSMq/WTjREktJVjxVA==",
|
||||
"deprecated": "This package has been replaced by @base-ui-components/react",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.26.0",
|
||||
"@floating-ui/react-dom": "^2.1.1",
|
||||
"@mui/types": "^7.2.21",
|
||||
"@mui/utils": "^6.4.1",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"clsx": "^2.1.1",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mui-org"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/core-downloads-tracker": {
|
||||
"version": "6.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.4.3.tgz",
|
||||
"integrity": "sha512-hlyOzo2ObarllAOeT1ZSAusADE5NZNencUeIvXrdQ1Na+FL1lcznhbxfV5He1KqGiuR8Az3xtCUcYKwMVGFdzg==",
|
||||
"version": "6.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@mui/core-downloads-tracker/-/core-downloads-tracker-6.4.4.tgz",
|
||||
"integrity": "sha512-r+J0EditrekkTtO2CnCBCOGpNaDYwJqz8lH4rj6o/anDcskZFJodBlG8aCJkS8DL/CF/9EHS+Gz53EbmYEnQbw==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mui-org"
|
||||
|
|
@ -1140,13 +1209,57 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/material": {
|
||||
"version": "6.4.3",
|
||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.3.tgz",
|
||||
"integrity": "sha512-ubtQjplbWneIEU8Y+4b2VA0CDBlyH5I3AmVFGmsLyDe/bf0ubxav5t11c8Afem6rkSFWPlZA2DilxmGka1xiKQ==",
|
||||
"node_modules/@mui/lab": {
|
||||
"version": "6.0.0-beta.27",
|
||||
"resolved": "https://registry.npmjs.org/@mui/lab/-/lab-6.0.0-beta.27.tgz",
|
||||
"integrity": "sha512-weLxPsCs2wJKgWKf46shXHE+x7qlf5VxMK3P+4HsWasMakV/uTmxsoT7PG3QCvakGQ2TdpZtQLE2umJKC0mvKQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.26.0",
|
||||
"@mui/core-downloads-tracker": "^6.4.3",
|
||||
"@mui/base": "5.0.0-beta.69",
|
||||
"@mui/system": "^6.4.3",
|
||||
"@mui/types": "^7.2.21",
|
||||
"@mui/utils": "^6.4.3",
|
||||
"clsx": "^2.1.1",
|
||||
"prop-types": "^15.8.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=14.0.0"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/mui-org"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.5.0",
|
||||
"@emotion/styled": "^11.3.0",
|
||||
"@mui/material": "^6.4.4",
|
||||
"@mui/material-pigment-css": "^6.4.3",
|
||||
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@emotion/react": {
|
||||
"optional": true
|
||||
},
|
||||
"@emotion/styled": {
|
||||
"optional": true
|
||||
},
|
||||
"@mui/material-pigment-css": {
|
||||
"optional": true
|
||||
},
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mui/material": {
|
||||
"version": "6.4.4",
|
||||
"resolved": "https://registry.npmjs.org/@mui/material/-/material-6.4.4.tgz",
|
||||
"integrity": "sha512-ISVPrIsPQsxnwvS40C4u03AuNSPigFeS2+n1qpuEZ94hDsdMi19dQM2JcC9CHEhXecSIQjP1RTyY0mPiSpSrFQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.26.0",
|
||||
"@mui/core-downloads-tracker": "^6.4.4",
|
||||
"@mui/system": "^6.4.3",
|
||||
"@mui/types": "^7.2.21",
|
||||
"@mui/utils": "^6.4.3",
|
||||
|
|
@ -1706,6 +1819,12 @@
|
|||
"resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.6.0.tgz",
|
||||
"integrity": "sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA=="
|
||||
},
|
||||
"node_modules/@types/crypto-js": {
|
||||
"version": "4.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/crypto-js/-/crypto-js-4.2.2.tgz",
|
||||
"integrity": "sha512-sDOLlVbHhXpAUAL0YHDUUwDZf3iN4Bwi4W6a0W0b+QcAezUbRtH4FVb+9J4h+XFPW7l/gQ9F8qC7P+Ec4k8QVQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/estree": {
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
|
||||
|
|
@ -1724,6 +1843,12 @@
|
|||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/lodash": {
|
||||
"version": "4.17.15",
|
||||
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.17.15.tgz",
|
||||
"integrity": "sha512-w/P33JFeySuhN6JLkysYUK2gEmy9kHHFN7E8ro0tkfmlDOgxBDzWEZ/J8cWA+fHqFevpswDTFZnDx+R9lbL6xw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/parse-json": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.2.tgz",
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
"@emotion/styled": "^11.14.0",
|
||||
"@fontsource/public-sans": "^5.1.2",
|
||||
"@mui/icons-material": "^6.4.3",
|
||||
"@mui/lab": "^6.0.0-beta.27",
|
||||
"@mui/material": "^6.4.3",
|
||||
"@tanstack/react-table": "^8.21.2",
|
||||
"axios": "^1.7.9",
|
||||
|
|
@ -28,6 +29,8 @@
|
|||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.19.0",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@types/lodash": "^4.17.15",
|
||||
"@types/react": "^19.0.8",
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
|
|
|
|||
|
|
@ -36,8 +36,6 @@ function getColorStyle({ variant, theme, color }: IconButtonStyleProps) {
|
|||
outlineOffset: 2
|
||||
}
|
||||
};
|
||||
|
||||
console.log(main);
|
||||
|
||||
switch (variant) {
|
||||
case 'contained':
|
||||
|
|
|
|||
|
|
@ -28,14 +28,12 @@ interface ReactTableProps<T extends object> {
|
|||
columns: ColumnDef<T>[];
|
||||
data: T[];
|
||||
striped?: boolean;
|
||||
title?: string;
|
||||
}
|
||||
|
||||
function ComponentReactTable<T extends object>({
|
||||
columns,
|
||||
data,
|
||||
striped,
|
||||
title,
|
||||
}: ReactTableProps<T>) {
|
||||
const [sorting, setSorting] = useState<SortingState>([]);
|
||||
const [columnFilters, setColumnFilters] = useState<ColumnFiltersState>([]);
|
||||
|
|
@ -135,9 +133,8 @@ function ComponentReactTable<T extends object>({
|
|||
|
||||
export default function ReactTable<T extends object>({
|
||||
striped,
|
||||
title,
|
||||
data,
|
||||
columns,
|
||||
}: ReactTableProps<T>) {
|
||||
return <ComponentReactTable {...{ data, columns, title, striped }} />;
|
||||
return <ComponentReactTable {...{ data, columns, striped }} />;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,6 @@ import Menu from "@mui/material/Menu";
|
|||
import MenuItem from "@mui/material/MenuItem";
|
||||
import IconButton from "@mui/material/IconButton";
|
||||
import MenuIcon from "@mui/icons-material/Menu";
|
||||
import Avatar from "@mui/material/Avatar";
|
||||
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
||||
import React from "react";
|
||||
import { useNavigate } from "react-router";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import Drawer from "@mui/material/Drawer";
|
||||
import Toolbar from "@mui/material/Toolbar";
|
||||
import Divider from "@mui/material/Divider";
|
||||
import List from "@mui/material/List";
|
||||
import ListItem from "@mui/material/ListItem";
|
||||
import ListSubheader from "@mui/material/ListSubheader";
|
||||
|
|
|
|||
|
|
@ -89,8 +89,6 @@ export default function Backbone() {
|
|||
<ReactTable
|
||||
data={data}
|
||||
columns={columns}
|
||||
// striped={true}
|
||||
title="Users Table"
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,6 @@ export default function Devices() {
|
|||
<ReactTable
|
||||
data={data}
|
||||
columns={columns}
|
||||
// striped={true}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,6 @@ export default function Fishbone() {
|
|||
<ReactTable
|
||||
data={data}
|
||||
columns={columns}
|
||||
// striped={true}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ export default function Towers() {
|
|||
<ReactTable
|
||||
data={data}
|
||||
columns={columns}
|
||||
// striped={true}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import Card from "@mui/material/Card";
|
|||
import FormControlLabel from "@mui/material/FormControlLabel";
|
||||
import Checkbox from "@mui/material/Checkbox";
|
||||
import Typography from "@mui/material/Typography";
|
||||
import Link from "@mui/material/Link";
|
||||
import Grid from "@mui/material/Grid2";
|
||||
import { useNavigate } from "react-router";
|
||||
import { useAuthStore } from "../../stores/authStore";
|
||||
|
|
|
|||
|
|
@ -6,12 +6,11 @@ import { createJSONStorage } from 'zustand/middleware';
|
|||
import { secureStorage } from './storage';
|
||||
|
||||
type PersistedAuthState = Pick<AuthState, 'token' | 'user'>;
|
||||
console.log(import.meta.env);
|
||||
|
||||
export const useAuthStore = create<AuthState>()(
|
||||
persist(
|
||||
(set, get) => ({
|
||||
token: null,
|
||||
(set) => ({
|
||||
token: null,
|
||||
user: null,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
|
|
|
|||
|
|
@ -1,25 +1,22 @@
|
|||
import CryptoJS from "crypto-js";
|
||||
import { StateStorage } from "zustand/middleware";
|
||||
|
||||
const KEY = import.meta.env.VITE_APP_KEY;
|
||||
|
||||
export const secureStorage: StateStorage = {
|
||||
getItem: (name: string): string | null => {
|
||||
const data = localStorage.getItem(name);
|
||||
if (!data) return null;
|
||||
try {
|
||||
const decrypted = CryptoJS.AES.decrypt(
|
||||
data,
|
||||
import.meta.env.VITE_APP_KEY
|
||||
).toString(CryptoJS.enc.Utf8);
|
||||
const decrypted = CryptoJS.AES.decrypt(data, KEY).toString(
|
||||
CryptoJS.enc.Utf8
|
||||
);
|
||||
return decrypted || null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
setItem: (name: string, value: string): void => {
|
||||
const encrypted = CryptoJS.AES.encrypt(
|
||||
value,
|
||||
import.meta.env.VITE_APP_KEY
|
||||
).toString();
|
||||
const encrypted = CryptoJS.AES.encrypt(value, KEY).toString();
|
||||
localStorage.setItem(name, encrypted);
|
||||
},
|
||||
removeItem: (name: string): void => {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ function getSizeStyle(size?: SwitchProps['size']): SwitchSizeProps {
|
|||
}
|
||||
}
|
||||
|
||||
function switchStyle(theme: Theme, size?: SwitchProps['size']) {
|
||||
function switchStyle(size?: SwitchProps['size']) {
|
||||
const sizes: SwitchSizeProps = getSizeStyle(size);
|
||||
|
||||
return {
|
||||
|
|
@ -88,11 +88,11 @@ export default function Switch(theme: Theme) {
|
|||
'& ~ .MuiFormControlLabel-label': {
|
||||
margin: 6
|
||||
},
|
||||
...switchStyle(theme, 'medium')
|
||||
...switchStyle('medium')
|
||||
},
|
||||
sizeLarge: { ...switchStyle(theme, 'large') },
|
||||
sizeLarge: { ...switchStyle('large') },
|
||||
sizeSmall: {
|
||||
...switchStyle(theme, 'small')
|
||||
...switchStyle('small')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ export default function ThemeCustomization({
|
|||
|
||||
const themeTypography: TypographyVariantsOptions =
|
||||
useMemo<TypographyVariantsOptions>(
|
||||
() => Typography(themeMode, fontFamily, theme),
|
||||
() => Typography(fontFamily),
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[themeMode, fontFamily]
|
||||
[fontFamily]
|
||||
);
|
||||
const themeCustomShadows: CustomShadowProps = useMemo<CustomShadowProps>(
|
||||
() => CustomShadows(theme),
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
// MATERIAL - UI
|
||||
import { Theme, TypographyVariantsOptions } from '@mui/material/styles';
|
||||
import { FontFamily, ThemeMode } from '../types/config';
|
||||
import { TypographyVariantsOptions } from '@mui/material';
|
||||
import { FontFamily } from '../types/config';
|
||||
|
||||
// ==============================|| DEFAULT THEME - TYPOGRAPHY ||============================== //
|
||||
|
||||
const Typography = (mode: ThemeMode, fontFamily: FontFamily, theme: Theme): TypographyVariantsOptions => ({
|
||||
const Typography = (fontFamily: FontFamily): TypographyVariantsOptions => ({
|
||||
htmlFontSize: 16,
|
||||
fontFamily,
|
||||
fontWeightLight: 300,
|
||||
|
|
|
|||
Loading…
Reference in New Issue