Remove some unused things
This commit is contained in:
@@ -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')
|
||||
@@ -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'}
|
||||
@@ -1,2 +0,0 @@
|
||||
export const LOGIN_INCLUDE_DEV_SERVERS = true
|
||||
export const PWI_ENABLED = true
|
||||
@@ -1,15 +0,0 @@
|
||||
export const getCanvas = (base64: string): Promise<HTMLCanvasElement> => {
|
||||
return new Promise(resolve => {
|
||||
const image = new Image()
|
||||
image.onload = () => {
|
||||
const canvas = document.createElement('canvas')
|
||||
canvas.width = image.width
|
||||
canvas.height = image.height
|
||||
|
||||
const ctx = canvas.getContext('2d')
|
||||
ctx?.drawImage(image, 0, 0)
|
||||
resolve(canvas)
|
||||
}
|
||||
image.src = base64
|
||||
})
|
||||
}
|
||||
@@ -25,7 +25,6 @@ import {
|
||||
type NativeStackNavigatorProps,
|
||||
} from '@react-navigation/native-stack'
|
||||
|
||||
import {PWI_ENABLED} from '#/lib/build-flags'
|
||||
import {useWebMediaQueries} from '#/lib/hooks/useWebMediaQueries'
|
||||
import {useSession} from '#/state/session'
|
||||
import {useOnboardingState} from '#/state/shell'
|
||||
@@ -115,7 +114,7 @@ function NativeStackNavigator({
|
||||
const {setShowLoggedOut} = useLoggedOutViewControls()
|
||||
const {isMobile} = useWebMediaQueries()
|
||||
const {leftNavMinimal} = useLayoutBreakpoints()
|
||||
if (!hasSession && (!PWI_ENABLED || activeRouteRequiresAuth || IS_NATIVE)) {
|
||||
if (!hasSession && (activeRouteRequiresAuth || IS_NATIVE)) {
|
||||
return <LoggedOut />
|
||||
}
|
||||
if (hasSession && currentAccount?.signupQueued) {
|
||||
|
||||
Reference in New Issue
Block a user