I encounter an error when I have a catch-all route in app.js
Code: Select all
<Routes>
// some valid routes....
<Route path="*" element={<ErrorPage />} />
</Routes>
Code: Select all
const label = props.meta.label; // TypeError: undefined is not an object (evaluating 'props.meta.label')
Code: Select all
const label = props?.meta?.label;
return label
? <>{location.pathname === '/' ? <span>Current Working</span> : <span>{label}</span>}</>
: <span>No page found</span>
p/s: diamond is a beautiful piece of work. Keep it up!