Skip to content

Commit

Permalink
Fix web issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur-eren committed Jun 5, 2024
1 parent 432274f commit 1780d7e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions JoyboyCommunity/src/screens/Auth/CreateAccount.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {canUseBiometricAuthentication} from 'expo-secure-store';
import {useState} from 'react';
import {Alert} from 'react-native';
import {Alert, Platform} from 'react-native';

import {LockIcon} from '../../assets/icons';
import {Button, Input, TextButton} from '../../components';
Expand All @@ -27,7 +27,7 @@ export const CreateAccount: React.FC<AuthCreateAccountScreenProps> = ({navigatio
await storePrivateKey(privateKey, password);
await storePublicKey(publicKey);

const biometySupported = canUseBiometricAuthentication();
const biometySupported = Platform.OS !== 'web' && canUseBiometricAuthentication();
if (biometySupported) {
Alert.alert('Easy login', 'Would you like to use biometrics to login?', [
{
Expand Down
3 changes: 2 additions & 1 deletion JoyboyCommunity/src/screens/Auth/Login.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {canUseBiometricAuthentication} from 'expo-secure-store';
import {useEffect, useState} from 'react';
import {Platform} from 'react-native';

import {LockIcon} from '../../assets/icons';
import {Button, Input, TextButton} from '../../components';
Expand All @@ -22,7 +23,7 @@ export const Login: React.FC<AuthLoginScreenProps> = ({navigation}) => {

useEffect(() => {
(async () => {
const biometrySupported = canUseBiometricAuthentication();
const biometrySupported = Platform.OS !== 'web' && canUseBiometricAuthentication?.();

if (biometrySupported) {
const storedPassword = await retrievePassword();
Expand Down

0 comments on commit 1780d7e

Please sign in to comment.