Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardoj committed Jan 23, 2025
1 parent 21d67d1 commit aaff517
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/components/AvatarWithImagePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import useLocalize from '@hooks/useLocalize';
import useTheme from '@hooks/useTheme';
import useThemeStyles from '@hooks/useThemeStyles';
import useWindowDimensions from '@hooks/useWindowDimensions';
import * as Browser from '@libs/Browser';
import {isSafari} from '@libs/Browser';
import type {CustomRNImageManipulatorResult} from '@libs/cropOrRotateImage/types';
import * as FileUtils from '@libs/fileDownload/FileUtils';
import {splitExtensionFromFileName, validateImageForCorruption} from '@libs/fileDownload/FileUtils';
import getImageResolution from '@libs/fileDownload/getImageResolution';
import type {AvatarSource} from '@libs/UserUtils';
import variables from '@styles/variables';
Expand Down Expand Up @@ -198,7 +198,7 @@ function AvatarWithImagePicker({
* Check if the attachment extension is allowed.
*/
const isValidExtension = useCallback((image: FileObject): boolean => {
const {fileExtension} = FileUtils.splitExtensionFromFileName(image?.name ?? '');
const {fileExtension} = splitExtensionFromFileName(image?.name ?? '');
return CONST.AVATAR_ALLOWED_EXTENSIONS.some((extension) => extension === fileExtension.toLowerCase());
}, []);

Expand Down Expand Up @@ -229,7 +229,7 @@ function AvatarWithImagePicker({
return;
}

FileUtils.validateImageForCorruption(image)
validateImageForCorruption(image)
.then(() => isValidResolution(image))
.then((isValid) => {
if (!isValid) {
Expand Down Expand Up @@ -271,7 +271,7 @@ function AvatarWithImagePicker({
icon: Expensicons.Upload,
text: translate('avatarWithImagePicker.uploadPhoto'),
onSelected: () => {
if (Browser.isSafari()) {
if (isSafari()) {
return;
}
openPicker({
Expand Down Expand Up @@ -421,7 +421,7 @@ function AvatarWithImagePicker({
// In order for the file picker to open dynamically, the click
// function must be called from within an event handler that was initiated
// by the user on Safari.
if (index === 0 && Browser.isSafari()) {
if (index === 0 && isSafari()) {
openPicker({
onPicked: (data) => showAvatarCropModal(data.at(0) ?? {}),
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/SignInButtons/AppleSignIn/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React, {useEffect, useState} from 'react';
import type {NativeConfig} from 'react-native-config';
import Config from 'react-native-config';
import getUserLanguage from '@components/SignInButtons/GetUserLanguage';
import {beginAppleSignIn} from '@libs/actions/Session';
import Log from '@libs/Log';
import * as Session from '@userActions/Session';
import CONFIG from '@src/CONFIG';
import CONST from '@src/CONST';
import type {AppleIDSignInOnFailureEvent, AppleIDSignInOnSuccessEvent} from '@src/types/modules/dom';
Expand Down Expand Up @@ -46,7 +46,7 @@ const config = {

const successListener = (event: AppleIDSignInOnSuccessEvent) => {
const token = event.detail.authorization.id_token;
Session.beginAppleSignIn(token);
beginAppleSignIn(token);
};

const failureListener = (event: AppleIDSignInOnFailureEvent) => {
Expand Down

0 comments on commit aaff517

Please sign in to comment.