質問編集履歴

3

navigation.navigate('Home')を追加しました

2018/02/14 14:30

投稿

yamady
yamady

スコア176

test CHANGED
File without changes
test CHANGED
@@ -66,6 +66,8 @@
66
66
 
67
67
  .push({ name, phone, shift })
68
68
 
69
+ .then(() => navigation.navigate("Home"));
70
+
69
71
  };
70
72
 
71
73
  };

2

DatabaseURLを追加しました。

2018/02/14 14:30

投稿

yamady
yamady

スコア176

test CHANGED
File without changes
test CHANGED
@@ -115,3 +115,91 @@
115
115
  なにか設定が足りていないのでしょうか。
116
116
 
117
117
  どうぞよろしくお願いします。
118
+
119
+
120
+
121
+ ## 追記①
122
+
123
+
124
+
125
+ ```JavaScript
126
+
127
+ export default class App extends React.Component<*, State> {
128
+
129
+ authSubscription: () => any;
130
+
131
+ state: State;
132
+
133
+
134
+
135
+ constructor() {
136
+
137
+ super();
138
+
139
+ // Set the default state of the component
140
+
141
+ this.state = {
142
+
143
+ loading: true,
144
+
145
+ };
146
+
147
+ }
148
+
149
+
150
+
151
+ componentWillMount() {
152
+
153
+ const config = {
154
+
155
+ apiKey: 'AIzaSXXXXXXXXXXXXXXXo0OW0c',
156
+
157
+ authDomain: 'XXXXXXXX.firebaseapp.com',
158
+
159
+ databaseURL: 'https://poXXXXXXX.firebaseio.com',
160
+
161
+ projectId: 'XXXXXXXX1',
162
+
163
+ storageBucket: 'pXXXXXXXXXX.appspot.com',
164
+
165
+ messagingSenderId: '9XXXXXXXXXXXX61'
166
+
167
+ };
168
+
169
+
170
+
171
+ firebase.initializeApp(config);
172
+
173
+ }
174
+
175
+ ・・・
176
+
177
+ ```
178
+
179
+
180
+
181
+ App.jsにconfigを追記してみましたが、効果はないようです。
182
+
183
+
184
+
185
+ ```
186
+
187
+ Deprecation: Calling 'initializeApp()' for apps that are already initialised natively is unnecessary, use 'firebase.app()' instead to access the already initialized default app instance.
188
+
189
+ ```
190
+
191
+ このエラーが出たので
192
+
193
+
194
+
195
+ ```JavaScript
196
+
197
+ componentWillMount() {
198
+
199
+ firebase.app();
200
+
201
+ }
202
+
203
+ ```
204
+
205
+ こちらも試して見ましたが、やはり無理みたいです。。。

1

URL表記が間違っていましいた

2018/02/14 13:19

投稿

yamady
yamady

スコア176

test CHANGED
File without changes
test CHANGED
@@ -62,13 +62,15 @@
62
62
 
63
63
  return () => {
64
64
 
65
- firebase.database().ref(`/users/${currentUser.uid}/seats`)
65
+ firebase.database().ref(`/employee/`)
66
66
 
67
67
  .push({ name, phone, shift })
68
68
 
69
69
  };
70
70
 
71
71
  };
72
+
73
+
72
74
 
73
75
  ```
74
76