Hi, I also tried the solution and the custom path is leading to the 404 page.
Could you take a look at where I need to fix it? Thank you!
src/index.js
const contactHandler = {
pattern: "/contact",
priority: 10,
func: ({ state }) => {
state.source.data["/contact"].isContact = true;
},
};
export default {
name: "my-custom-theme",
roots: {
theme: Root,
},
actions: {
theme: {
int: ({ libraries }) => {
libraries.source.handlers.push(contactHandler);
},
toggleMobileMenu: ({ state }) => {
state.theme.isMobileMenuOpen = !state.theme.isMobileMenuOpen;
},
closeMobileMenu: ({ state }) => {
state.theme.isMobileMenuOpen = false;
},
},
},
};
src/component/iindex.js
<Switch>
<Loading when={data.isFetching} />
<Home when={data.isHome} />
<Contact when={data.isContact} />
<NotFound />
</Switch>
frontity.settings.js
const settings = {
...
packages: [
{
name: "my-custom-theme",
state: {
theme: {
menu: [
["Home", "/"],
["Contact", "/contact"],
],
},
},
},
...
};