diff --git a/src/lib/assets.native.ts b/src/lib/assets.native.ts deleted file mode 100644 index e679d6256f..0000000000 --- a/src/lib/assets.native.ts +++ /dev/null @@ -1,4 +0,0 @@ -import {type ImageRequireSource} from 'react-native' - -export const DEF_AVATAR: ImageRequireSource = require('../../assets/default-avatar.png') -export const CLOUD_SPLASH: ImageRequireSource = require('../../assets/splash.png') diff --git a/src/lib/assets.ts b/src/lib/assets.ts deleted file mode 100644 index c5e0f8493e..0000000000 --- a/src/lib/assets.ts +++ /dev/null @@ -1,6 +0,0 @@ -import {type ImageRequireSource} from 'react-native' - -// @ts-ignore we need to pretend -prf -export const DEF_AVATAR: ImageRequireSource = {uri: '/img/default-avatar.png'} -// @ts-ignore we need to pretend -prf -export const CLOUD_SPLASH: ImageRequireSource = {uri: '/img/splash.png'} diff --git a/src/lib/hooks/useTimer.ts b/src/lib/hooks/useTimer.ts deleted file mode 100644 index b14a9f24fd..0000000000 --- a/src/lib/hooks/useTimer.ts +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from 'react' - -/** - * Helper hook to run persistent timers on views - */ -export function useTimer(time: number, handler: () => void) { - const timer = React.useRef(undefined) - - // function to restart the timer - const reset = React.useCallback(() => { - if (timer.current) { - clearTimeout(timer.current) - } - timer.current = setTimeout(handler, time) - }, [time, timer, handler]) - - // function to cancel the timer - const cancel = React.useCallback(() => { - if (timer.current) { - clearTimeout(timer.current) - timer.current = undefined - } - }, [timer]) - - // start the timer immediately - React.useEffect(() => { - reset() - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) - - return [reset, cancel] -} diff --git a/src/lib/icons.tsx b/src/lib/icons.tsx index 4bea1ebeff..1c0611a2ca 100644 --- a/src/lib/icons.tsx +++ b/src/lib/icons.tsx @@ -1,5 +1,5 @@ import {type StyleProp, type TextStyle, type ViewStyle} from 'react-native' -import Svg, {Ellipse, Line, Path, Rect} from 'react-native-svg' +import Svg, {Line, Path} from 'react-native-svg' // Copyright (c) 2020 Refactoring UI Inc. // https://github.com/tailwindlabs/heroicons/blob/master/LICENSE @@ -32,62 +32,6 @@ export function MagnifyingGlassIcon({ ) } -export function MagnifyingGlassIcon2({ - style, - size, - strokeWidth = 2, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - return ( - - - - - ) -} - -export function CogIcon({ - style, - size, - strokeWidth = 1.5, -}: { - style?: StyleProp - size?: string | number - strokeWidth: number -}) { - return ( - - - - - ) -} - // Copyright (c) 2020 Refactoring UI Inc. // https://github.com/tailwindlabs/heroicons/blob/master/LICENSE export function UserGroupIcon({ @@ -115,75 +59,6 @@ export function UserGroupIcon({ ) } -export function SquareIcon({ - style, - size, - strokeWidth = 1.3, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - return ( - - - - ) -} - -export function RectWideIcon({ - style, - size, - strokeWidth = 1.3, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - return ( - - - - ) -} - -export function RectTallIcon({ - style, - size, - strokeWidth = 1.3, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - return ( - - - - ) -} - export function ComposeIcon2({ style, size, @@ -251,93 +126,3 @@ export function InfoCircleIcon({ ) } - -export function HandIcon({ - style, - size, - strokeWidth = 1.5, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - return ( - - - - - - ) -} - -export function HashtagIcon({ - style, - size, - strokeWidth = 1.5, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - return ( - - - - - - - ) -} - -// Copyright (c) 2020 Refactoring UI Inc. -// https://github.com/tailwindlabs/heroicons/blob/master/LICENSE -export function ShieldExclamation({ - style, - size, - strokeWidth = 1.5, -}: { - style?: StyleProp - size?: string | number - strokeWidth?: number -}) { - let color = 'currentColor' - if ( - style && - typeof style === 'object' && - 'color' in style && - typeof style.color === 'string' - ) { - color = style.color - } - return ( - - - - ) -}