Skip to content
This repository has been archived by the owner on Feb 2, 2022. It is now read-only.

Commit

Permalink
v1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowflake107 committed Feb 28, 2021
1 parent 7882ff7 commit 00e11ed
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 6 deletions.
11 changes: 9 additions & 2 deletions App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { Component } from 'react';
import { WebView } from 'react-native-webview';
import Loader from './components/Loader';
import { StatusBar } from 'react-native';
import Error from './components/Error';

export default class App extends Component {

Expand All @@ -23,10 +24,16 @@ export default class App extends Component {
render() {
if (!this.state.loading) {
return (
<WebView source={{ uri: 'https://scratch-for-discord.netlify.app' }} style={{ marginTop: StatusBar.currentHeight }} />
<WebView
source={{ uri: 'https://scratch-for-discord.netlify.app' }}
style={{ marginTop: StatusBar.currentHeight }}
userAgent=""
renderError={(name) => <Error message={name} />}
renderLoading={() => <Loader message="Loading..." />}
/>
);
} else {
return <Loader />;
return <Loader message="Scratch For Discord" />;
}
}

Expand Down
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "scratch-for-discord",
"slug": "scratch-for-discord",
"version": "1.0.0",
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
Expand Down
Binary file modified assets/adaptive-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 modified assets/favicon.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 modified assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions components/Error.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import React from 'react'
import { StyleSheet, Text, View, Image } from 'react-native';
import Logo from '../assets/icon.png'

export default function Error({ message }) {
return (
<View style={styles.container}>
<Image source={Logo} style={styles.image} />
<Text style={styles.text}>{message || 'Something went wrong!'}</Text>
</View>
)
}

const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
text: {
color: '#000000',
fontSize: 48,
fontWeight: 'bold',
textAlign: 'center'
},
image: {
width: 100,
height: 100
}
});
4 changes: 2 additions & 2 deletions components/Loader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react'
import { StyleSheet, Text, View, Image } from 'react-native';
import Logo from "../assets/icon.png"

export default function Loader() {
export default function Loader({ message }) {
return (
<View style={styles.container}>
<Image source={Logo} style={styles.image} />
<Text style={styles.text}>Scratch For Discord</Text>
<Text style={styles.text}>{message || 'Scratch For Discord'}</Text>
</View>
)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"private": true,
"name": "scratch-for-discord",
"version": "1.0.0",
"version": "1.0.1",
"description": "Scratch For Discord android app",
"repository": {
"type": "git",
Expand Down

0 comments on commit 00e11ed

Please sign in to comment.