Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
node_modules/**/*
.exponent/**/*
.expo/**/*
.vscode/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true
}
66 changes: 66 additions & 0 deletions App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React from 'react';
import { AppLoading } from 'expo';
import {
AppRegistry,
Platform,
StatusBar,
StyleSheet,
View,
Text,
} from 'react-native';
import cacheAssetsAsync from './utilities/cacheAssetsAsync';
import Router from './navigation/Router';

class App extends React.Component {
state = {
isAppReady: false,
};

async _loadAssetsAsync() {
try {
await cacheAssetsAsync({
images: [
require('./assets/images/exponent-wordmark.png'),
require('./assets/images/placeholder.png'),
],
fonts: [
{
'space-mono': require('./assets/fonts/SpaceMono-Regular.ttf'),
},
{ pacifico: require('./assets/fonts/Pacifico.ttf') },
],
});
} catch (e) {
console.warn(
`There was an error caching assets (see: App.js), perhaps due to a network timeout, so we skipped caching. Reload the app to try again.`
);
}
}

render() {
if (!this.state.isAppReady)
return (
<AppLoading
startAsync={this._loadAssetsAsync}
onFinish={() => this.setState({ isAppReady: true })}
onError={console.warn}
/>
);
return (
<React.Fragment>
{Platform.OS === 'ios' && <StatusBar barStyle="light-content" />}
{Platform.OS === 'android' && <View style={styles.statusBarUnderlay} />}
<Router />
</React.Fragment>
);
}
}

const styles = StyleSheet.create({
statusBarUnderlay: {
height: 24,
backgroundColor: 'rgba(0,0,0,0.2)',
},
});

export default App;
36 changes: 36 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"expo": {
"name": "Sambal",
"description":"No description",
"slug": "sambal-exp",
"privacy": "public",
"sdkVersion": "35.0.0",
"platforms": [
"ios",
"android",
"web"
],
"version": "0.1.1",
"orientation": "portrait",
"primaryColor": "#f8a551",
"icon": "./assets/images/sambal_icon.png",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#F8931E"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.sambal.exp"
},
"android": {
"package": "com.sambal.exp"
}
}
}
73 changes: 37 additions & 36 deletions assets/fixtures/CardsData.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
[
{
"name": "Wantan Mee",
"image": "https://demwvw9lpu8ak.cloudfront.net/attachments/7a060023616d7110399598caa60b016673149de8/store/fill/800/500/7a9fbb97f075b585a6af04216fa305fe140972a9dc53d7a6b2d8f9f17a67/featured_image.jpg"
},
{
"name": "NASI LEMAK",
"image": "https://storybookstorage.s3.amazonaws.com/items/images/000/134/326/original/english.jpg"
},
{
"name": "CHEE CHEONG FUN",
"image": "http://www.rasamalaysia.com/uploaded_images/cheongfun.jpg"
},
{
"name": "ROTI CANAI",
"image": "http://www.templeofthai.com/images/asian-food-life/Malaysia-Roti-Canai-960x640.jpg"
},
{
"name": "CHILLI PAN MEE",
"image": "http://www.chillipanmee.com/wp-content/uploads/2010/02/chilli-pan-mee-4.jpg"
},
{
"name": "SUSHI",
"image": "http://az616578.vo.msecnd.net/files/2016/05/27/635999646476505798-1665549773_SUSHI%20COVER.jpg"
},
{
"name": "SATAY",
"image": "http://www.healthxchange.com.sg/healthyliving/DietandNutrition/PublishingImages/Satay-Not-Just-a-Sinful-Indulgence-Pic.jpg"
},
{
"name": "MEE CURRY",
"image": "http://www.halfhourmeals.com/image/recipe/easy-peasy-curry-mee_large.jpg"
},
{
"name": "CHICKEN RICE",
"image": "http://steamykitchen.com/wp-content/uploads/2009/08/hainanese-chicken-86.jpg"},
]
{
"name": "Wantan Mee",
"image": "https://demwvw9lpu8ak.cloudfront.net/attachments/7a060023616d7110399598caa60b016673149de8/store/fill/800/500/7a9fbb97f075b585a6af04216fa305fe140972a9dc53d7a6b2d8f9f17a67/featured_image.jpg"
},
{
"name": "NASI LEMAK",
"image": "https://storybookstorage.s3.amazonaws.com/items/images/000/134/326/original/english.jpg"
},
{
"name": "CHEE CHEONG FUN",
"image": "http://www.rasamalaysia.com/uploaded_images/cheongfun.jpg"
},
{
"name": "ROTI CANAI",
"image": "http://www.templeofthai.com/images/asian-food-life/Malaysia-Roti-Canai-960x640.jpg"
},
{
"name": "CHILLI PAN MEE",
"image": "http://www.chillipanmee.com/wp-content/uploads/2010/02/chilli-pan-mee-4.jpg"
},
{
"name": "SUSHI",
"image": "http://az616578.vo.msecnd.net/files/2016/05/27/635999646476505798-1665549773_SUSHI%20COVER.jpg"
},
{
"name": "SATAY",
"image": "http://www.healthxchange.com.sg/healthyliving/DietandNutrition/PublishingImages/Satay-Not-Just-a-Sinful-Indulgence-Pic.jpg"
},
{
"name": "MEE CURRY",
"image": "http://www.halfhourmeals.com/image/recipe/easy-peasy-curry-mee_large.jpg"
},
{
"name": "CHICKEN RICE",
"image": "http://steamykitchen.com/wp-content/uploads/2009/08/hainanese-chicken-86.jpg"
}
]
Binary file added assets/images/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = function(api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
};
};
Loading