mirror of
https://github.com/selfxyz/self.git
synced 2026-04-05 03:00:53 -04:00
SEL-269: Update ESLint rules & lock prettier config (#781)
* Update ESLint config and lock prettier config * Refine ESLint config and fix lint issues * Apply eslint fixes * Use socketIo alias (#782) * move gesture handler * save wip updates * fix svg imports * update tsconfig * eslint updates * eslint fixes * improve ignore folders * coderabbit feedback * Fix style prop shorthands (#787) * Expand view style props * Expand remaining style props * update types * fix pipeline * fix test env check * nicer casting * fix booleans * update deeplink url handling and make it more robust * add socket error handler
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import React from 'react';
|
||||
import React, { Component } from 'react';
|
||||
import { Text, View } from 'react-native';
|
||||
|
||||
import analytics from '../utils/analytics';
|
||||
@@ -15,7 +15,7 @@ interface State {
|
||||
hasError: boolean;
|
||||
}
|
||||
|
||||
class ErrorBoundary extends React.Component<Props, State> {
|
||||
class ErrorBoundary extends Component<Props, State> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
this.state = { hasError: false };
|
||||
|
||||
@@ -63,7 +63,7 @@ const Mnemonic = ({ words = REDACTED, onRevealWords }: MnemonicProps) => {
|
||||
Clipboard.setString(words.join(' '));
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 2500);
|
||||
}, [words, revealWords]);
|
||||
}, [onRevealWords, revealWords, setHasViewedRecoveryPhrase, words]);
|
||||
|
||||
return (
|
||||
<YStack position="relative" alignItems="stretch" gap={0}>
|
||||
@@ -98,7 +98,7 @@ const Mnemonic = ({ words = REDACTED, onRevealWords }: MnemonicProps) => {
|
||||
borderTopWidth={0}
|
||||
borderBottomLeftRadius="$5"
|
||||
borderBottomRightRadius="$5"
|
||||
py="$2"
|
||||
paddingVertical={16}
|
||||
onPress={copyToClipboardOrReveal}
|
||||
width="100%"
|
||||
textAlign="center"
|
||||
|
||||
@@ -39,7 +39,7 @@ export const LeftAction: React.FC<LeftActionProps> = ({
|
||||
onPress,
|
||||
...props
|
||||
}) => {
|
||||
let children: React.ReactNode = useMemo(() => {
|
||||
const children: React.ReactNode = useMemo(() => {
|
||||
switch (component) {
|
||||
case 'back':
|
||||
return (
|
||||
@@ -69,7 +69,7 @@ export const LeftAction: React.FC<LeftActionProps> = ({
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
}, [component]);
|
||||
}, [color, component, onPress]);
|
||||
|
||||
if (!children) {
|
||||
return null;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import React, { useCallback } from 'react';
|
||||
import React, { useCallback, useEffect } from 'react';
|
||||
|
||||
import { extractMRZInfo } from '../../utils/utils';
|
||||
|
||||
@@ -27,7 +27,7 @@ export const PassportCamera: React.FC<PassportCameraProps> = ({
|
||||
}, [onPassportRead, isMounted]);
|
||||
|
||||
// Web stub - no functionality yet
|
||||
React.useEffect(() => {
|
||||
useEffect(() => {
|
||||
// Simulate that the component is not ready for web
|
||||
if (isMounted) {
|
||||
console.warn('PassportCamera: Web implementation not yet available');
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
// SPDX-License-Identifier: BUSL-1.1; Copyright (c) 2025 Social Connect Labs, Inc.; Licensed under BUSL-1.1 (see LICENSE); Apache-2.0 from 2029-06-11
|
||||
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { NativeSyntheticEvent, requireNativeComponent } from 'react-native';
|
||||
import { findNodeHandle, UIManager } from 'react-native';
|
||||
import {
|
||||
findNodeHandle,
|
||||
NativeSyntheticEvent,
|
||||
requireNativeComponent,
|
||||
UIManager,
|
||||
} from 'react-native';
|
||||
|
||||
export interface RCTFragmentViewManagerProps {
|
||||
RCTFragmentViewManager: ReturnType<typeof requireNativeComponent>;
|
||||
|
||||
Reference in New Issue
Block a user