Skip to content

useSlugs

The code

export const useURL = () =>
useState <
String >
("url", () => "https://test.cirugia.alebateducation.com/");
export const useSlugs = () =>
useState <
Object >
("slugs",
() => {
return {
home: "/",
live: "/live",
formacion: "/formacion",
blog: "/blogs",
login: "/login",
myAccount: "/mi-cuenta",
};
});

How to use?

URL

const url = useURL();

Slugs

useSlugs().value.live;
useSlugs().value.home;