Skip to content

Commit 4f0fa9a

Browse files
fix some oddball warnings
1 parent 3c2a235 commit 4f0fa9a

File tree

9 files changed

+12
-11
lines changed

9 files changed

+12
-11
lines changed

App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import useCachedResources from './hooks/useCachedResources';
55
import Navigation from './navigation';
66
import {Inter_300Light, useFonts} from "@expo-google-fonts/inter";
77

8+
// noinspection JSUnusedGlobalSymbols
89
export default function App() {
910
const isLoadingComplete = useCachedResources();
1011
const colorScheme = "dark";

constants/Layout.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {Dimensions} from 'react-native';
33
const width = Dimensions.get('window').width;
44
const height = Dimensions.get('window').height;
55

6+
// noinspection JSUnusedGlobalSymbols
67
export default {
78
window: {
89
width,

hooks/useColorScheme.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {ColorSchemeName, useColorScheme as _useColorScheme} from 'react-native';
33
// The useColorScheme value is always either light or dark, but the built-in
44
// type suggests that it can be null. This will not happen in practice, so this
55
// makes it a bit easier to work with.
6+
// noinspection JSUnusedGlobalSymbols
67
export default function useColorScheme(): NonNullable<ColorSchemeName> {
78
return _useColorScheme() as NonNullable<ColorSchemeName>;
89
}

screens/EmailAddressScreen.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ export default function EmailScreen() {
7373

7474
const address = await AsyncStorage.getItem("@email_address");
7575

76-
if (!address) throw new Error();
76+
if (!address) {
77+
// noinspection ExceptionCaughtLocallyJS
78+
throw new Error();
79+
}
7780

7881
CoolStorage.address = address;
7982
CoolStorage.token = token;

screens/ModalScreen.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
import {Button, Linking, Platform, Pressable, StyleSheet, TouchableHighlight, View} from 'react-native';
1+
import {Button, Platform, StyleSheet, View} from 'react-native';
22
import {Email} from "tempmail.lol";
33
import {WebView} from "react-native-webview";
44
import {Component} from "react";
55
import {parse} from "node-html-parser";
66
import {StatusBar} from "expo-status-bar";
77
import {Text} from "../components/Themed";
8-
import {FontAwesome} from "@expo/vector-icons";
98

109
export default class ModalScreen extends Component<any> {
1110
render() {

screens/TabTwoScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ import ModalShareThingy from "../util/ModalShareThingy";
66
import {Email} from "tempmail.lol";
77
import licenses from "../util/licenses";
88

9-
function openSource() {
9+
async function openSource() {
1010
const url = "https://github.com/tempmail-lol/app";
11-
Linking.openURL(url);
11+
await Linking.openURL(url);
1212
}
1313

1414
function openOSL() {

types.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// noinspection JSUnusedGlobalSymbols
2+
13
/**
24
* Learn more about using TypeScript with React Navigation:
35
* https://reactnavigation.org/docs/typescript/

util/CoolStorage.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import {Email} from "tempmail.lol";
44
//can't use "Storage", js devs take all the good names and reserve them.
55
export default class CoolStorage {
66

7-
private constructor() {
8-
}
9-
107
public static token: string;
118
public static address: string;
129

util/ModalShareThingy.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
//this is not a hack
22
export default class ModalShareThingy {
33

4-
private constructor() {
5-
}
6-
74
public static modal: any;
85

96
}

0 commit comments

Comments
 (0)