## 概要 [Task: 1468](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/OMDSDictation/_sprints/taskboard/OMDSDictation%20%E3%83%81%E3%83%BC%E3%83%A0/OMDSDictation/%E3%82%B9%E3%83%97%E3%83%AA%E3%83%B3%E3%83%88%204-2?workitem=1468) - ヘッダーcomponentを作成 - ログイン前とログイン後でヘッダーが異なるので各ページに配置するようにした - 呼び出すcomponentは一つとして作成し、内部でヘッダーを切り替えるようにした - フッターcomponentを作成 - ログイン前とログイン後でページのデザインが異なるのでヘッダー同様、各ページに配置することにした ## レビューポイント - ヘッダーの作成方法に問題はないか ## UIの変更 - https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task1468?csf=1&web=1&e=K2tFjK ## 動作確認状況 - 型チェック - ローカルで動作確認 ## 補足
46 lines
1.4 KiB
TypeScript
46 lines
1.4 KiB
TypeScript
import { Route, Routes } from "react-router-dom";
|
|
import TopPage from "pages/TopPage";
|
|
import LoginPage from "pages/LoginPage";
|
|
import SamplePage from "pages/SamplePage";
|
|
import { AuthErrorPage } from "pages/ErrorPage";
|
|
import { NotFoundPage } from "pages/ErrorPage/notFound";
|
|
import { RouteAuthGuard } from "components/auth/routeAuthGuard";
|
|
import SignupPage from "pages/SignupPage";
|
|
|
|
const AppRouter: React.FC = () => (
|
|
<Routes>
|
|
<Route path="/" element={<TopPage />} />
|
|
<Route path="/login" element={<LoginPage />} />
|
|
<Route path="/authError" element={<AuthErrorPage />} />
|
|
<Route path="/signup" element={<SignupPage completeTo="/" />} />
|
|
<Route
|
|
path="/xxx"
|
|
element={<RouteAuthGuard component={<SamplePage />} />}
|
|
/>
|
|
{/* XXX ヘッダーの挙動確認のため仮のページを作成 */}
|
|
<Route
|
|
path="/account"
|
|
element={<RouteAuthGuard component={<SamplePage />} />}
|
|
/>
|
|
<Route
|
|
path="/user"
|
|
element={<RouteAuthGuard component={<SamplePage />} />}
|
|
/>
|
|
<Route
|
|
path="/dictations"
|
|
element={<RouteAuthGuard component={<SamplePage />} />}
|
|
/>
|
|
<Route
|
|
path="/license"
|
|
element={<RouteAuthGuard component={<SamplePage />} />}
|
|
/>
|
|
<Route
|
|
path="/workflow"
|
|
element={<RouteAuthGuard component={<SamplePage />} />}
|
|
/>
|
|
<Route path="*" element={<NotFoundPage />} />
|
|
</Routes>
|
|
);
|
|
|
|
export default AppRouter;
|