Raw
1 import { useEffect } from "react"
2 import { Outlet, useLocation, useNavigate } from "react-router-dom"
3
4 export const Settings = () => {
5 const navigate = useNavigate()
6 const location = useLocation()
7
8 useEffect(() => {
9 if (location.pathname === "/settings") {
10 navigate("/settings/store", { replace: true })
11 }
12 }, [location.pathname, navigate])
13
14 return <Outlet />
15 }