1
0
Fork 0
mirror of https://github.com/Unkn0wnCat/KevinK.dev.js.git synced 2025-08-21 21:36:49 +02:00

Add new blog components and post

This commit is contained in:
Kevin Kandlbinder 2022-02-05 17:16:03 +00:00 committed by GitHub
commit a352600428
16 changed files with 440 additions and 5 deletions
src/pages

View file

@ -20,6 +20,7 @@ import {
Phone,
} from "lucide-react";
import { useTranslation } from "react-i18next";
import { useMediaQuery } from "@react-hook/media-query";
//import * as particleConfig from "./index.particles.json";
export const query = graphql`
@ -62,9 +63,11 @@ export const query = graphql`
const IndexPage = (props) => {
const { t } = useTranslation();
const reduceMotion = useMediaQuery("(prefers-reduced-motion: reduce)")
React.useEffect(() => {
if (typeof window === "undefined") return;
if (reduceMotion) return;
anime({
targets: [
@ -95,7 +98,7 @@ const IndexPage = (props) => {
/*if (typeof window !== "undefined")
// eslint-disable-next-line no-undef
window.setTimeout(loadTsParticles, 1000);*/
}, []);
}, [reduceMotion]);
let meta = props.data.site.siteMetadata;