Skip to content
Snippets Groups Projects
Commit a37fe674 authored by Shreya Sharma's avatar Shreya Sharma
Browse files

setup for app

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #150543 failed
node_modules/**/*
.expo/*
\ No newline at end of file
App.js 0 → 100644
import React from 'react'
import { createStackNavigator } from 'react-navigation';
import {AuthSession} from 'expo'
const RootStack = createStackNavigator (
{
Profile: {
screen: Profile,
navigationOptions: ({ navigation }) => ({
headerMode: 'none',
headerTransparent: true
}),
},
Repositories: {
screen: Repositories,
navigationOptions: ({ navigation }) => ({
title: 'Repositories',
}),
},
Followers: {
screen: Followers,
navigationOptions: ({ navigation }) => ({
title: 'My Followers',
}),
},
Following: {
screen: Following,
navigationOptions: ({ navigation }) => ({
title: 'Following',
}),
}
},
{
initialRouteName: 'Profile',
}
)
export class App extends React.Component
{
constructor(properties) {
super(properties)
this.state = {};
}
authorizeOAuth = async () => {
let redirectUrl = AuthSession.getRedirectUrl()
console.log(redirectUrl);
console.log(`https://github.com/login/oauth/authorize` +
`&client_id=1f161604092bb84609dd` +
`&redirect_uri=${encodeURIComponent(redirectUrl)}`);
let result = await AuthSession.startAsync({
authUrl:
`https://github.com/login/oauth/authorize` +
`&client_id=1f161604092bb84609dd` +
`&redirect_uri=${encodeURIComponent(redirectUrl)}`,
}).then(resp => console.log(resp));
console.log(result);
this.setState({ result })
};
render() {
return <RootStack />;
}
}
\ No newline at end of file
app.json 0 → 100644
{
"expo": {
"name": "assignment3",
"description": "This project .",
"slug": "assignment3",
"privacy": "public",
"sdkVersion": "30.0.0",
"platforms": ["ios", "android"],
"version": "1.0.0",
"orientation": "portrait",
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
}
}
}
\ No newline at end of file
This diff is collapsed.
{
"name": "empty-project-template",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
},
"dependencies": {
"axios": "^0.18.0",
"expo": "^30.0.1",
"react": "16.3.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
"react-native-material-design": "^0.3.7",
"react-native-oauth": "^2.1.18",
"react-native-orientation": "^3.1.3",
"react-native-svg": "^8.0.3",
"react-native-svg-icon": "^0.8.1",
"react-native-svg-uri": "^1.2.3",
"react-navigation": "^2.18.0"
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment