import React, { useEffect } from 'react'
import { MemoryRouter, Route, Routes, useNavigate } from 'react-router-dom'
import Page from './page'
const Dummy: React.FC = () => {
const navigate = useNavigate()
useEffect(() => {
navigate('/a', { state: 'ダミータイトル' })
}, [])
return (
<div>HOME</div>
)
}
const template: Page = () => {
return (
<MemoryRouter>
<Routes>
<Route path="/" element={<Dummy />} />
<Route path="/a" element={<Page />} />
</Routes>
</MemoryRouter>
)
}
export const normal = template.bind({})
normal.storyName = 'Default'