Skip to content

Commit

Permalink
Merge branch 'main' into feat/update_reset_modal
Browse files Browse the repository at this point in the history
  • Loading branch information
shanimal08 authored Feb 25, 2025
2 parents 624efb4 + 0136872 commit f8fa4db
Show file tree
Hide file tree
Showing 61 changed files with 475 additions and 829 deletions.
18 changes: 18 additions & 0 deletions knip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { KnipConfig } from 'knip';

const config: KnipConfig = {
project: ['src/**/*.{js,ts,tsx}', 'scripts/**/*.{js,ts}'],
rules: {
files: 'error',
dependencies: 'warn',
unlisted: 'warn',
exports: 'warn',
types: 'warn',
duplicates: 'error',
},
ignoreBinaries: ['commitlint'],
ignoreDependencies: ['prettier-eslint', 'babel-plugin-styled-components'], // needed by plugins
ignoreExportsUsedInFile: true,
};

export default config;
486 changes: 365 additions & 121 deletions package-lock.json

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@
"build": "tsc && vite build",
"preview": "vite preview",
"tauri": "tauri",
"lint": "eslint src/",
"lint": "knip && eslint src/",
"lint:fix": "eslint src/ --fix",
"lint:taplo": "taplo format --check",
"translate": "node ./scripts/translator.js"
"translate": "node ./scripts/translator.js",
"knip": "knip"
},
"dependencies": {
"@floating-ui/react": "^0.27.4",
"@lottiefiles/dotlottie-react": "^0.13.0",
"@sentry/react": "^8.48.0",
"@tauri-apps/api": "^2.2.0",
"@tauri-apps/plugin-clipboard-manager": "^2.2.0",
"@tauri-apps/plugin-os": "^2.2.0",
"@tauri-apps/plugin-process": "^2.2.0",
"@tauri-apps/plugin-shell": "^2.2.0",
"@tauri-apps/plugin-updater": "^2.3.1",
"emoji-regex": "^10.4.0",
"globals": "^15.15.0",
"i18next": "^24.2.2",
Expand Down Expand Up @@ -63,6 +61,7 @@
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.3",
"eslint-plugin-react-hooks": "^5.1.0",
"knip": "^5.44.0",
"prettier": "^3.5.2",
"prettier-eslint": "^16.3.0",
"react-qr-code": "^2.0.15",
Expand Down
3 changes: 1 addition & 2 deletions src/App/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import * as Sentry from '@sentry/react';
import { memo, useMemo } from 'react';
import { AppContentContainer } from '@app/App/App.styles';
import { useShuttingDown } from '@app/hooks';
Expand Down Expand Up @@ -69,7 +68,7 @@ export default function App() {
const { t } = useTranslation('common', { useSuspense: false });

if (!window.WebGL2RenderingContext && !window.WebGLRenderingContext) {
Sentry.captureMessage('WebGL not supported by the browser', { extra: { userAgent: navigator.userAgent } });
console.error(`WebGL not supported by the browser - userAgent: ${navigator.userAgent}`);
setIsWebglNotSupported(true);
setError(t('webgl-not-supported'));
}
Expand Down
1 change: 0 additions & 1 deletion src/App/sentryIgnore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,3 @@ export const ALREADY_FETCHING = {
METRICS,
BALANCE,
};
export const IGNORE_FETCHING = Object.values(ALREADY_FETCHING);
56 changes: 0 additions & 56 deletions src/assets/tari-logo.tsx

This file was deleted.

39 changes: 0 additions & 39 deletions src/assets/universe-logo.tsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/components/FieldErrorMessage/FieldErrorMessage.component.tsx

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions src/components/FieldErrorMessage/FieldErrorMessage.types.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/FieldErrorMessage/index.ts

This file was deleted.

98 changes: 0 additions & 98 deletions src/components/NumberInput/NumberInput.component.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/NumberInput/NumberInput.constants.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/components/NumberInput/NumberInput.styles.tsx

This file was deleted.

26 changes: 0 additions & 26 deletions src/components/NumberInput/NumberInput.types.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/NumberInput/index.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/components/ToastStack/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ToastType, useToastStore } from '../useToastStore';
import { Wrapper, CloseButton, ToastContent, ProgressCircle, Title, Text } from './styles';
import { useMotionValue } from 'motion/react';

export interface Props {
interface ToastProps {
id?: number | string;
index?: number;
title: string;
Expand All @@ -16,14 +16,14 @@ export interface Props {
type?: ToastType;
}

export const Toast = ({ id, index, title, text, timeout = 4500, isHovered = false, type = 'default' }: Props) => {
export const Toast = ({ id, index, title, text, timeout = 4500, isHovered = false, type = 'default' }: ToastProps) => {
const [show, setShow] = useState(false);
const [positionVariant, setPositionVariant] = useState('hidden');
const progress = useMotionValue(0);
const progressInterval = useRef<NodeJS.Timeout>();
const elapsedTimeRef = useRef<number>(0);
const lastUpdateRef = useRef<number>(Date.now());
const { removeToast } = useToastStore();
const removeToast = useToastStore((s) => s.removeToast);
const [finished, setFinished] = useState(false);

const handleHide = useCallback((id: number | string = 0) => {
Expand Down
Loading

0 comments on commit f8fa4db

Please sign in to comment.