-
Notifications
You must be signed in to change notification settings - Fork 3
/
App.js
34 lines (30 loc) Β· 822 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import App from "./src/App";
import React from "react";
import { Text } from "react-native";
import Loading from "./src/Loading";
Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
export default class extends React.Component {
state = {
isLoading: true,
};
componentDidMount = async () => {
// 1,000κ° 1μ΄
// http://hccparkinson.duckdns.org:19737/pingtest
setTimeout(() => {
fetch("http://hccparkinson.duckdns.org:19737/pingtest", {
method: "GET",
}).then((response) => {
console.log(response.status);
if (response.status === 200) this.setState({ isLoading: false });
});
}, 3000);
};
render() {
if (this.state.isLoading) {
return <Loading />;
} else {
return <App></App>;
}
}
}