File tree Expand file tree Collapse file tree 2 files changed +42
-5
lines changed Expand file tree Collapse file tree 2 files changed +42
-5
lines changed Original file line number Diff line number Diff line change
1
+ import NotFoundPage from '@/pages/404'
2
+ import type { Meta , StoryObj } from '@storybook/react'
3
+ import { MemoryRouter , Route , Routes } from 'react-router-dom'
4
+
5
+ const meta : Meta < typeof NotFoundPage > = {
6
+ title : 'pages/404' ,
7
+ component : NotFoundPage ,
8
+ parameters : {
9
+ // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
10
+ layout : 'fullscreen' ,
11
+ } ,
12
+ tags : [ 'autodocs' ] ,
13
+ }
14
+
15
+ export default meta
16
+
17
+ type Story = StoryObj < typeof NotFoundPage >
18
+
19
+ /**
20
+ * 標準フッター
21
+ */
22
+ export const Default : Story = {
23
+ render : ( ) => (
24
+ < MemoryRouter initialEntries = { [ '/' ] } >
25
+ < Routes >
26
+ < Route path = "/" element = { < NotFoundPage /> } />
27
+ </ Routes >
28
+ </ MemoryRouter >
29
+ ) ,
30
+ }
Original file line number Diff line number Diff line change 1
1
import { Link } from 'react-router-dom'
2
2
3
3
const NotFoundPage = ( ) => (
4
- < >
5
- < h1 > 404 NOT FOUND</ h1 >
6
- < p > お探しのページは見つかりませんでした。</ p >
7
- < Link to = "/" > 戻る</ Link >
8
- </ >
4
+ < div className = "container flex flex-col" >
5
+ < h1 className = "text-3xl m-auto mt-5" > 404 NOT FOUND</ h1 >
6
+ < p className = "text-base text-red-600 mx-auto mt-5" >
7
+ お探しのページは見つかりませんでした。
8
+ </ p >
9
+ < Link
10
+ to = "/"
11
+ className = "border-2 w-28 h-9 text-center rounded-md bg-blue-400 text-white mx-auto my-5 p-1"
12
+ >
13
+ 戻る
14
+ </ Link >
15
+ </ div >
9
16
)
10
17
11
18
export default NotFoundPage
You can’t perform that action at this time.
0 commit comments