MainLayout for theme persistence

This commit is contained in:
Sean Edmunds
2025-01-17 11:33:30 -06:00
parent f49895dee9
commit e7f5e94ed6
13 changed files with 150 additions and 77 deletions

View File

@@ -8,10 +8,10 @@ function Applications({ contentType, isMobile }: any) {
const { data, isFetching } = useQueryAPI({ endpoint: 'api/apps' });
const [applications, setApplications] = useState([]);
useEffect(() => {
if (!isFetching) {
if (data && !isFetching) {
setApplications(data);
}
}, [isFetching]);
}, [data, isFetching]);
return (
<>
{applications.length > 0 && contentType.length > 0 && (