-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #428 from bounswe/mobile
Mobile Merge to Main
- Loading branch information
Showing
35 changed files
with
23,453 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files | ||
|
||
# dependencies | ||
node_modules/ | ||
|
||
# Expo | ||
.expo/ | ||
dist/ | ||
web-build/ | ||
|
||
# Native | ||
*.orig.* | ||
*.jks | ||
*.p8 | ||
*.p12 | ||
*.key | ||
*.mobileprovision | ||
|
||
# Metro | ||
.metro-health-check* | ||
|
||
# debug | ||
npm-debug.* | ||
yarn-debug.* | ||
yarn-error.* | ||
|
||
# macOS | ||
.DS_Store | ||
*.pem | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
|
||
# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb | ||
# The following patterns were generated by expo-cli | ||
|
||
expo-env.d.ts | ||
# @end expo-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"expo": { | ||
"name": "bulingo", | ||
"slug": "bulingo", | ||
"version": "0.1.0", | ||
"orientation": "portrait", | ||
"icon": "./assets/images/icon.png", | ||
"scheme": "myapp", | ||
"userInterfaceStyle": "automatic", | ||
"splash": { | ||
"image": "./assets/images/splash.png", | ||
"resizeMode": "contain", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"assetBundlePatterns": [ | ||
"**/*" | ||
], | ||
"ios": { | ||
"supportsTablet": true | ||
}, | ||
"android": { | ||
"adaptiveIcon": { | ||
"foregroundImage": "./assets/images/adaptive-icon.png", | ||
"backgroundColor": "#ffffff" | ||
}, | ||
"package": "com.anil24.searchitect", | ||
"softwareKeyboardLayoutMode": "pan" | ||
}, | ||
"web": { | ||
"bundler": "metro", | ||
"output": "static", | ||
"favicon": "./assets/images/favicon.png" | ||
}, | ||
"plugins": [ | ||
"expo-router", | ||
"expo-font" | ||
], | ||
"experiments": { | ||
"typedRoutes": true | ||
}, | ||
"extra": { | ||
"router": { | ||
"origin": false | ||
}, | ||
"eas": { | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// TokenManager.ts | ||
|
||
// Define an interface for the tokens | ||
interface Tokens { | ||
accessToken: string | null; | ||
refreshToken: string | null; | ||
} | ||
|
||
class TokenManager { | ||
private tokens: Tokens; | ||
private username: string | null; | ||
|
||
constructor() { | ||
this.tokens = { | ||
accessToken: null, | ||
refreshToken: null, | ||
}; | ||
this.username = null; | ||
} | ||
|
||
// Method to set tokens | ||
setTokens(tokens: Tokens): void { | ||
this.tokens = tokens; | ||
} | ||
|
||
// Method to get tokens | ||
getTokens(): Tokens { | ||
return this.tokens; | ||
} | ||
|
||
setUsername(username: string|null): void { | ||
this.username = username; | ||
} | ||
|
||
getUsername(): string|null { | ||
return this.username; | ||
} | ||
|
||
// Method to clear tokens | ||
clearTokens(): void { | ||
this.tokens = { | ||
accessToken: null, | ||
refreshToken: null, | ||
}; | ||
} | ||
} | ||
|
||
// Export a single instance of TokenManager | ||
export default new TokenManager(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Stack } from 'expo-router'; | ||
|
||
export default function Layout() { | ||
|
||
console.log("Layout run") | ||
return ( | ||
<Stack | ||
screenOptions={{ | ||
headerStyle: { | ||
backgroundColor: '#f4511e', | ||
}, | ||
headerTintColor: '#fff', | ||
headerTitleStyle: { | ||
fontWeight: 'bold', | ||
}, | ||
}}> | ||
<Stack.Screen name="quizFeed" options={{headerShown: false}} /> | ||
|
||
<Stack.Screen name="register" options={{headerShown: false}} /> | ||
<Stack.Screen name="quizDetails" options={{headerShown: false}} /> | ||
<Stack.Screen name="login" options={{headerShown: false}}/> | ||
<Stack.Screen name="quizResults" options={{headerShown: false}}/> | ||
<Stack.Screen name="index" options={{headerShown: false}}/> | ||
<Stack.Screen name="quizQuestion" options={{headerShown: false}}/> | ||
<Stack.Screen name="quizCreationQuestionList" options={{headerShown: false}}/> | ||
<Stack.Screen name="quizCreationSettings" options={{headerShown: false}}/> | ||
<Stack.Screen name="quizCreationInfo" options={{headerShown: false}}/> | ||
</Stack> | ||
); | ||
} |
Oops, something went wrong.