Skip to content
Snippets Groups Projects

feat(fetch submaps): added query to fetch models(submaps) on app load

Merged Tadeusz Miesiąc requested to merge feature/MIN-76-fetch-submaps-on-app-start into development
2 unresolved threads
13 files
+ 233
6
Compare changes
  • Side-by-side
  • Inline
Files
13
@@ -2,6 +2,9 @@ import { Manrope } from '@next/font/google';
import { twMerge } from 'tailwind-merge';
import { Map } from '@/components/Map';
import { FunctionalArea } from '@/components/FunctionalArea';
import { useAppDispatch } from '@/redux/hooks/useAppDispatch';
import { useEffect } from 'react';
import { getModels } from '@/redux/models/models.thunks';
const manrope = Manrope({
variable: '--font-manrope',
@@ -10,9 +13,17 @@ const manrope = Manrope({
subsets: ['latin'],
});
export const MinervaSPA = (): JSX.Element => (
<div className={twMerge('relative', manrope.variable)}>
<FunctionalArea />
<Map />
</div>
);
export const MinervaSPA = (): JSX.Element => {
const dispatch = useAppDispatch();
useEffect(() => {
dispatch(getModels());
}, [dispatch]);
return (
<div className={twMerge('relative', manrope.variable)}>
<FunctionalArea />
<Map />
</div>
);
};
Loading