diff --git a/src/components/PageLayout/Footer/Footer.tsx b/src/components/PageLayout/Footer/Footer.tsx index 6825a39c..5b169fec 100644 --- a/src/components/PageLayout/Footer/Footer.tsx +++ b/src/components/PageLayout/Footer/Footer.tsx @@ -19,8 +19,8 @@ export const Footer: FC = () => { isLoading: menuItemsIsLoading, error: menuItemsError, } = useQuery({ - queryKey: ['cms', 'menu-item', 'on-site', seminarId], - queryFn: () => axios.get(`/api/cms/menu-item/on-site/${seminarId}`), + queryKey: ['cms', 'menu-item', 'on-site', seminarId, '?footer'], + queryFn: () => axios.get(`/api/cms/menu-item/on-site/${seminarId}?type=footer`), }) const menuItems = menuItemsData?.data ?? [] diff --git a/src/components/PageLayout/MenuMain/MenuMain.tsx b/src/components/PageLayout/MenuMain/MenuMain.tsx index 2fc63502..211ab56d 100644 --- a/src/components/PageLayout/MenuMain/MenuMain.tsx +++ b/src/components/PageLayout/MenuMain/MenuMain.tsx @@ -25,8 +25,8 @@ export const MenuMain: FC = () => { const toggleMenu = () => setIsVisible((currentIsVisible) => !currentIsVisible) const {data: menuItemsData, isLoading: menuItemsIsLoading} = useQuery({ - queryKey: ['cms', 'menu-item', 'on-site', seminarId], - queryFn: () => axios.get(`/api/cms/menu-item/on-site/${seminarId}`), + queryKey: ['cms', 'menu-item', 'on-site', seminarId, '?menu'], + queryFn: () => axios.get(`/api/cms/menu-item/on-site/${seminarId}?type=menu`), }) const menuItems = menuItemsData?.data ?? [] diff --git a/src/types/api/cms.ts b/src/types/api/cms.ts index 2c3cbe37..94ebc38c 100644 --- a/src/types/api/cms.ts +++ b/src/types/api/cms.ts @@ -2,6 +2,8 @@ export interface MenuItemShort { id: number caption: string url: string + in_footer: boolean + in_menu: boolean } export interface PostLink {