From e1fed56e0835df65aac5feacb84695840bb42b91 Mon Sep 17 00:00:00 2001 From: kouhei ueno Date: Sun, 9 Jun 2019 02:37:54 +0900 Subject: [PATCH] =?UTF-8?q?firebase=20hosting=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- firebase.json | 12 +++++++----- src/components/App.tsx | 2 +- src/components/Molecules/LoginForm.tsx | 8 ++++++-- src/index.tsx | 13 ++++++++++++- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/firebase.json b/firebase.json index f475554..b2ef247 100644 --- a/firebase.json +++ b/firebase.json @@ -1,10 +1,12 @@ { "hosting": { "public": "build", - "ignore": [ - "firebase.json", - "**/.*", - "**/node_modules/**" - ] + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ], + "ignore": ["firebase.json", "**/.*", "**/node_modules/**"] } } diff --git a/src/components/App.tsx b/src/components/App.tsx index 061bd77..32d832b 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,7 +1,7 @@ import React from 'react'; const App: React.FC = () => { - return
aa
; + return
aaaaa
; }; export default App; diff --git a/src/components/Molecules/LoginForm.tsx b/src/components/Molecules/LoginForm.tsx index 602cdfa..536a12e 100644 --- a/src/components/Molecules/LoginForm.tsx +++ b/src/components/Molecules/LoginForm.tsx @@ -2,7 +2,11 @@ import React, { useState } from 'react'; import TextInput from '../Atoms/TextInput'; import { Button } from '@material-ui/core'; -const LoginForm: React.FC<{}> = () => { +interface IProps { + url: string; +} + +const LoginForm: React.FC = props => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); @@ -10,7 +14,7 @@ const LoginForm: React.FC<{}> = () => { const changePassword = (e: React.ChangeEvent) => setPassword(e.target.value); return ( -
+ () => ; + ReactDOM.render( - + + , document.getElementById('root') );