Skip to content

Commit

Permalink
Merge pull request #17 from yednapg/main
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoder authored Dec 5, 2024
2 parents c65f73e + 26a450f commit 8b62e0a
Show file tree
Hide file tree
Showing 15 changed files with 10,756 additions and 7,296 deletions.
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
ios/**
ios/**
android/**
9 changes: 7 additions & 2 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useState, useEffect, useCallback } from "react";
import { StatusBar, useColorScheme } from "react-native";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { SWRConfig } from "swr";
import { useFonts } from 'expo-font';

Check failure on line 10 in App.tsx

View workflow job for this annotation

GitHub Actions / ESLint

`expo-font` import should occur before import of `expo-linking`

import AuthContext from "./src/auth";
import { getStateFromPath } from "./src/getStateFromPath";
Expand Down Expand Up @@ -48,10 +49,14 @@ const linking: LinkingOptions<TabParamList> = {
};

export default function App() {
const [fontsLoaded] = useFonts({
'JetBrainsMono-Regular': require('./assets/fonts/JetBrainsMono-Regular.ttf'),
'JetBrainsMono-Bold': require('./assets/fonts/JetBrainsMono-Bold.ttf'),
});

const [isLoading, setIsLoading] = useState(true);
const [token, setToken] = useState<string | null>(null);
const hcb = useClient(token);

const scheme = useColorScheme();

const fetcher = useCallback(
Expand Down Expand Up @@ -84,7 +89,7 @@ export default function App() {
if (typeof token == "string") SecureStorage.setItemAsync("token", token);
}, [token]);

if (isLoading) {
if (!fontsLoaded || isLoading) {
return null;
} else if (!token) {
return (
Expand Down
7 changes: 5 additions & 2 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default {
ios: {
supportsTablet: true,
bundleIdentifier: IS_DEV ? "com.hackclub.hcb.dev" : "com.hackclub.hcb",
buildNumber: "1.0.0.11",
buildNumber: "1.0.0.12",
config: {
usesNonExemptEncryption: false,
},
Expand Down Expand Up @@ -57,7 +57,10 @@ export default {
[
"expo-font",
{
fonts: ["./assets/fonts/JetBrainsMono-Regular.ttf"],
fonts: [
"./assets/fonts/JetBrainsMono-Regular.ttf",
"./assets/fonts/JetBrainsMono-Bold.ttf",
],
},
],
"expo-secure-store",
Expand Down
Binary file added assets/fonts/JetBrainsMono-Bold.ttf
Binary file not shown.
2 changes: 1 addition & 1 deletion eas.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"env": {
"EXPO_PUBLIC_API_BASE": "https://hcb.hackclub.com/api/v4",
"EXPO_PUBLIC_CLIENT_ID": "yt8JHmPDmmYYLUmoEiGtocYwg5fSOGCrcIY3G-vkMRs",
"EXPO_PUBLIC_STRIPE_API_KEY": "pk_live_UAjIP1Kss29XZ6tW0MFWkjUQ" // "pk" stands for "publishable key" you wannabe hacker
"EXPO_PUBLIC_STRIPE_API_KEY": "pk_live_UAjIP1Kss29XZ6tW0MFWkjUQ"
}
}
},
Expand Down
Loading

0 comments on commit 8b62e0a

Please sign in to comment.