|
|
@ -2,6 +2,8 @@
|
|
|
|
import useSWR from "swr";
|
|
|
|
import useSWR from "swr";
|
|
|
|
import Head from "next/head";
|
|
|
|
import Head from "next/head";
|
|
|
|
import dynamic from "next/dynamic";
|
|
|
|
import dynamic from "next/dynamic";
|
|
|
|
|
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
|
|
|
|
import { useEffect } from "react";
|
|
|
|
|
|
|
|
|
|
|
|
import ServicesGroup from "components/services/group";
|
|
|
|
import ServicesGroup from "components/services/group";
|
|
|
|
import BookmarksGroup from "components/bookmarks/group";
|
|
|
|
import BookmarksGroup from "components/bookmarks/group";
|
|
|
@ -30,7 +32,10 @@ export async function getStaticProps() {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export default function Home({ settings }) {
|
|
|
|
export default function Home({ settings }) {
|
|
|
|
|
|
|
|
const { i18n } = useTranslation();
|
|
|
|
|
|
|
|
|
|
|
|
const { data: services } = useSWR("/api/services");
|
|
|
|
const { data: services } = useSWR("/api/services");
|
|
|
|
const { data: bookmarks } = useSWR("/api/bookmarks");
|
|
|
|
const { data: bookmarks } = useSWR("/api/bookmarks");
|
|
|
|
const { data: widgets } = useSWR("/api/widgets");
|
|
|
|
const { data: widgets } = useSWR("/api/widgets");
|
|
|
@ -41,6 +46,12 @@ export default function Home({ settings }) {
|
|
|
|
wrappedStyle.backgroundSize = "cover";
|
|
|
|
wrappedStyle.backgroundSize = "cover";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
|
|
|
if (settings.language) {
|
|
|
|
|
|
|
|
i18n.changeLanguage(settings.language);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}, [i18n, settings.language]);
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<ColorProvider>
|
|
|
|
<ColorProvider>
|
|
|
|
<ThemeProvider>
|
|
|
|
<ThemeProvider>
|
|
|
|