Skip to content

Commit ff05e91

Browse files
fix: OAuth login not working (#6693)
* fix: import of loginOauthOrSso * chore: remove logs * fix: state.js imports * fix: import * fix: lint not detecting import errors on js files
1 parent 2fe20c9 commit ff05e91

File tree

9 files changed

+260
-10
lines changed

9 files changed

+260
-10
lines changed

.eslintrc.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,14 @@ module.exports = {
33
'import/resolver': {
44
node: {
55
extensions: ['.ts', '.tsx', '.js', '.ios.js', '.android.js', '.native.js', '.ios.tsx', '.android.tsx']
6+
},
7+
typescript: {
8+
alwaysTryTypes: true,
9+
project: './tsconfig.json'
610
}
11+
},
12+
'import/parsers': {
13+
'@typescript-eslint/parser': ['.ts', '.tsx']
714
}
815
},
916
parser: '@babel/eslint-parser',
@@ -29,6 +36,8 @@ module.exports = {
2936
'jest/globals': true
3037
},
3138
rules: {
39+
'import/named': 'error',
40+
'import/no-unresolved': 'error',
3241
'import/extensions': [
3342
'error',
3443
'ignorePackages',

app/sagas/deepLinking.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import { localAuthenticate } from '../lib/methods/helpers/localAuthentication';
1919
import log from '../lib/methods/helpers/log';
2020
import UserPreferences from '../lib/methods/userPreferences';
2121
import { videoConfJoin } from '../lib/methods/videoConf';
22-
import { loginOAuthOrSso, notifyUser } from '../lib/services/restApi';
22+
import { loginOAuthOrSso } from '../lib/services/connect';
23+
import { notifyUser } from '../lib/services/restApi';
2324
import sdk from '../lib/services/sdk';
2425
import Navigation from '../lib/navigation/appNavigation';
2526

app/sagas/state.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import log from '../lib/methods/helpers/log';
55
import { localAuthenticate, saveLastLocalAuthenticationSession } from '../lib/methods/helpers/localAuthentication';
66
import { APP_STATE } from '../actions/actionsTypes';
77
import { RootEnum } from '../definitions';
8-
import { setUserStatus } from '../lib/services/restApi';
9-
import { checkAndReopen, setUserPresenceOnline, setUserPresenceAway } from '../lib/services/connect';
8+
import { checkAndReopen } from '../lib/services/connect';
9+
import { setUserPresenceOnline, setUserPresenceAway } from '../lib/services/restApi';
1010

1111
const appHasComeBackToForeground = function* appHasComeBackToForeground() {
1212
const appRoot = yield select(state => state.app.root);

app/views/RoomView/List/components/EmptyRoom.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ const styles = StyleSheet.create({
1111
}
1212
});
1313

14-
export const EmptyRoom = React.memo(({ length, rid }: { length: number; rid: string }) => {
14+
const EmptyRoom = React.memo(({ length, rid }: { length: number; rid: string }) => {
1515
const { theme } = useTheme();
1616
if (length === 0 || !rid) {
1717
return <ImageBackground source={{ uri: `message_empty_${theme === 'dark' ? 'black' : theme}` }} style={styles.image} />;
1818
}
1919
return null;
2020
});
21+
22+
export default EmptyRoom;

app/views/RoomView/List/components/List.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const styles = StyleSheet.create({
1818
}
1919
});
2020

21-
export const List = ({ listRef, jumpToBottom, ...props }: IListProps) => {
21+
const List = ({ listRef, jumpToBottom, ...props }: IListProps) => {
2222
const [visible, setVisible] = useState(false);
2323
const { isAutocompleteVisible } = useRoomContext();
2424
const scrollHandler = useAnimatedScrollHandler({
@@ -57,3 +57,5 @@ export const List = ({ listRef, jumpToBottom, ...props }: IListProps) => {
5757
</View>
5858
);
5959
};
60+
61+
export default List;

app/views/RoomView/List/components/index.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/views/RoomView/List/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React, { forwardRef, useImperativeHandle } from 'react';
22

33
import { useDebounce } from '../../../lib/methods/helpers';
4-
import { EmptyRoom, List } from './components';
4+
import EmptyRoom from './components/EmptyRoom';
5+
import List from './components/List';
56
import { IListContainerProps, IListContainerRef, IListProps } from './definitions';
67
import { useMessages, useScroll } from './hooks';
78

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"color2k": "1.2.4",
6565
"dequal": "2.0.3",
6666
"ejson": "2.2.3",
67+
"eslint-import-resolver-typescript": "^4.4.4",
6768
"expo": "53",
6869
"expo-apple-authentication": "7.2.3",
6970
"expo-av": "15.1.3",

yarn.lock

Lines changed: 238 additions & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)