Skip to content

Commit

Permalink
Redesign home ans post telescope react native app
Browse files Browse the repository at this point in the history
Reorder Navigation

Add pagination in post

Fix Eslint config

Remove About page and its components
  • Loading branch information
Kevan-Y committed May 30, 2022
1 parent 3633c9a commit 9815927
Show file tree
Hide file tree
Showing 31 changed files with 944 additions and 643 deletions.
3 changes: 2 additions & 1 deletion src/mobile/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKIC
# Post Services
################################################################################

POSTS_URL = 'https://dev.api.telescope.cdot.systems/v1/posts'
POSTS_URL=https://dev.api.telescope.cdot.systems/v1/posts
IMAGE_URL=https://dev.api.telescope.cdot.systems/v1/image
5 changes: 5 additions & 0 deletions src/mobile/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ module.exports = {
*/
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
/**
* Disabled due to bug see:
* https://github.com/Intellicode/eslint-plugin-react-native/issues/270
*/
'react-native/no-raw-text': 'off',
},
env: {
'react-native/react-native': true,
Expand Down
1 change: 1 addition & 0 deletions src/mobile/app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default {
supabaseUrl: process.env.SUPABASE_URL,
supabaseKey: process.env.ANON_KEY,
postsUrl: process.env.POSTS_URL,
imageServiceUrl: process.env.IMAGE_URL,
},
},
};
7 changes: 6 additions & 1 deletion src/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@
"@react-navigation/bottom-tabs": "6.1.0",
"@react-navigation/native": "6.0.7",
"@react-navigation/native-stack": "6.3.0",
"@react-navigation/stack": "6.2.1",
"@senecacdot/telescope": "file:../..",
"@supabase/supabase-js": "1.32.1",
"dotenv": "16.0.0",
"expo": "44.0.6",
"expo-constants": "13.0.1",
"expo-status-bar": "1.2.0",
"expo-updates": "0.11.6",
"expo-updates": "0.11.7",
"expo-web-browser": "10.1.0",
"moment": "2.29.3",
"react": "17.0.1",
"react-dom": "17.0.1",
"react-native": "0.64.3",
"react-native-elements": "3.4.2",
"react-native-gesture-handler": "2.1.0",
"react-native-render-html": "6.3.4",
"react-native-safe-area-context": "3.3.2",
"react-native-screens": "3.10.1",
Expand Down
28 changes: 27 additions & 1 deletion src/mobile/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,39 @@ import 'react-native-url-polyfill/auto';
import { NavigationContainer } from '@react-navigation/native';
import { registerRootComponent } from 'expo';
import { SWRConfig } from 'swr';
import { AppState } from 'react-native';

import Navigation from './navigation/Navigation';

export default registerRootComponent(function App() {
return (
// https://swr.vercel.app/docs/advanced/react-native
<SWRConfig
value={{ fetcher: (resource, init) => fetch(resource, init).then((res) => res.json()) }}
value={{
provider: () => new Map(),
isVisible: () => {
return true;
},
initFocus(callback) {
let appState = AppState.currentState;

const onAppStateChange = (nextAppState) => {
/* If it's resuming from background or inactive mode to active one */
if (appState.match(/inactive|background/) && nextAppState === 'active') {
callback();
}
appState = nextAppState;
};

// Subscribe to the app state change events
const subscription = AppState.addEventListener('change', onAppStateChange);

return () => {
subscription.remove();
};
},
fetcher: (resource, init) => fetch(resource, init).then((res) => res.json()),
}}
>
<NavigationContainer>
<Navigation />
Expand Down
Binary file added src/mobile/src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 0 additions & 36 deletions src/mobile/src/components/Banner/Banner.jsx

This file was deleted.

29 changes: 0 additions & 29 deletions src/mobile/src/components/Banner/BannerButtons.jsx

This file was deleted.

67 changes: 0 additions & 67 deletions src/mobile/src/components/Banner/BannerText.jsx

This file was deleted.

136 changes: 0 additions & 136 deletions src/mobile/src/components/Footer.jsx

This file was deleted.

36 changes: 0 additions & 36 deletions src/mobile/src/components/GitHubContributorCard.jsx

This file was deleted.

Loading

0 comments on commit 9815927

Please sign in to comment.