2021-12-30 13:57:05 +09:00
|
|
|
import React from 'react';
|
2021-10-03 02:08:39 +09:00
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
import ParentSide from './side';
|
2021-10-03 02:08:39 +09:00
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
import ParentMeetings from './meeting';
|
|
|
|
import ParentMeetingDetail from './meeting/detail';
|
|
|
|
import ParentMeetingAdd from './meeting/add';
|
|
|
|
import ParentMeetingEdit from './meeting/edit';
|
2021-10-03 02:08:39 +09:00
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
import ParentFavorite from './favorite';
|
|
|
|
import ParentSearch from './search';
|
2021-10-03 02:08:39 +09:00
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
import ParentChilds from './child';
|
|
|
|
import ParentChildAdd from './child/add';
|
|
|
|
import ParentChildEdit from './child/edit';
|
|
|
|
import ParentChildDetail from './child/detail';
|
|
|
|
|
|
|
|
import ParentProfileDetail from './profile';
|
|
|
|
import ParentProfileEdit from './profile/edit';
|
|
|
|
import ParentProfilePasswordEdit from './profile/password_edit';
|
|
|
|
import ParentProfileWithdrawal from './profile/withdrawal';
|
2021-10-03 02:08:39 +09:00
|
|
|
|
2021-12-19 04:32:51 +09:00
|
|
|
import { BrowserRouter, Route, Switch } from 'react-router-dom';
|
2021-12-31 07:01:06 +09:00
|
|
|
import PageChangeHandler from '../component/page_change_handler';
|
2021-12-31 10:50:15 +09:00
|
|
|
import ScrollToTop from '../component/scroll_top';
|
2021-12-19 04:32:51 +09:00
|
|
|
|
2021-12-28 17:31:33 +09:00
|
|
|
export const App = () => {
|
2021-11-14 21:22:30 +09:00
|
|
|
return (
|
|
|
|
<main className="l-container">
|
|
|
|
<BrowserRouter>
|
2021-12-31 10:50:15 +09:00
|
|
|
<ScrollToTop />
|
2021-12-31 07:01:06 +09:00
|
|
|
<PageChangeHandler/>
|
2021-11-14 21:22:30 +09:00
|
|
|
<Switch>
|
2021-10-31 12:26:19 +09:00
|
|
|
<Route exact path='/p-account' component={ParentMeetings} />
|
|
|
|
<Route exact path='/p-account/meeting' component={ParentMeetings} />
|
|
|
|
<Route exact path='/p-account/meeting/detail/:meeting_id' component={ParentMeetingDetail} />
|
|
|
|
<Route exact path='/p-account/meeting/new' component={ParentMeetingAdd} />
|
|
|
|
<Route exact path='/p-account/meeting/edit/:meeting_id' component={ParentMeetingEdit} />
|
2021-11-14 21:22:30 +09:00
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
<Route exact path='/p-account/favorite' component={ParentFavorite} />
|
|
|
|
<Route exact path='/p-account/search' component={ParentSearch} />
|
2021-11-14 21:22:30 +09:00
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
<Route exact path='/p-account/child' component={ParentChilds} />
|
|
|
|
<Route exact path='/p-account/child/add' component={ParentChildAdd} />
|
|
|
|
<Route exact path='/p-account/child/edit/hire-date/:child_id' component={ParentChildEdit} />
|
|
|
|
<Route exact path='/p-account/child/detail/:child_id' component={ParentChildDetail} />
|
2021-11-14 21:22:30 +09:00
|
|
|
|
2021-10-31 12:26:19 +09:00
|
|
|
<Route exact path='/p-account/profile' component={ParentProfileDetail} />
|
|
|
|
<Route exact path='/p-account/profile/edit/:father_id' component={ParentProfileEdit} />
|
|
|
|
<Route exact path='/p-account/profile/edit/password/:father_id' component={ParentProfilePasswordEdit} />
|
|
|
|
<Route exact path='/p-account/profile/withdrawal' component={ParentProfileWithdrawal} />
|
2021-11-14 21:22:30 +09:00
|
|
|
</Switch>
|
2021-10-31 12:26:19 +09:00
|
|
|
<ParentSide />
|
2021-11-14 21:22:30 +09:00
|
|
|
</BrowserRouter>
|
|
|
|
</main>
|
|
|
|
);
|
2021-10-03 02:08:39 +09:00
|
|
|
}
|
|
|
|
|
2021-12-31 07:01:06 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-03 02:08:39 +09:00
|
|
|
if(document.getElementById('p-app')){
|
|
|
|
ReactDOM.render(
|
2021-12-28 17:31:33 +09:00
|
|
|
<App/>,
|
2021-10-03 02:08:39 +09:00
|
|
|
document.getElementById('p-app')
|
|
|
|
)
|
|
|
|
}
|