chore: update

This commit is contained in:
2025-07-15 17:28:41 +02:00
parent c7ef1146b3
commit 7c93cd76d9
38 changed files with 6306 additions and 11016 deletions

View File

@@ -3,7 +3,6 @@ import React from "react";
import * as styles from "./Icon.module.scss";
import { ICONS } from "@/constants";
interface Props {
name: keyof typeof ICONS;
icon: {

View File

@@ -1,11 +1,7 @@
import React, { FC } from "react";
import { graphql, StaticQuery } from "gatsby";
import {
GatsbyImage,
GatsbyImageProps,
IGatsbyImageData,
} from "gatsby-plugin-image";
import { GatsbyImage, GatsbyImageProps, IGatsbyImageData } from "gatsby-plugin-image";
import { FileSystemNode } from "gatsby-source-filesystem";
interface Props extends Omit<GatsbyImageProps, "image"> {
@@ -28,9 +24,7 @@ const Image: FC<Props> = ({ path, ...rest }: Props) => (
<StaticQuery
query={graphql`
query {
images: allFile(
filter: { ext: { regex: "/png|jpg|jpeg|webp|tif|tiff/" } }
) {
images: allFile(filter: { ext: { regex: "/png|jpg|jpeg|webp|tif|tiff/" } }) {
edges {
node {
absolutePath

View File

@@ -1,9 +1,9 @@
import React from "react";
import Helmet from "react-helmet";
import { useSiteMetadata } from "@/hooks";
import { CookieBar } from "../Cookiebar/CookieBar";
import * as styles from "./Layout.module.scss";
import { useSiteMetadata } from "@/hooks";
interface Props {
title: string;
@@ -20,7 +20,6 @@ const Layout: React.FC<Props> = ({
description,
socialImage = "",
noIndex = false,
slug,
}: Props) => {
const { author, url } = useSiteMetadata();
const metaImage = socialImage || author.photo;

View File

@@ -11,9 +11,7 @@ describe("Page", () => {
title: mocks.markdownRemark.frontmatter.title,
};
const tree = renderer
.create(<Page {...props}>{props.children}</Page>)
.toJSON();
const tree = renderer.create(<Page {...props}>{props.children}</Page>).toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@@ -1,8 +1,8 @@
import React, { useEffect, useRef } from "react";
import type { Nullable } from "@/types";
import { Helmet } from "react-helmet";
import * as styles from "./Page.module.scss";
import type { Nullable } from "@/types";
interface Props {
title?: string;

View File

@@ -1,8 +1,8 @@
import { PAGINATION } from "@/constants";
import classNames from "classnames";
import { Link } from "gatsby";
import React from "react";
import * as styles from "./Pagination.module.scss";
import { PAGINATION } from "@/constants";
type Props = {
prevPagePath: string;

View File

@@ -1,6 +1,6 @@
import { useSiteMetadata } from "@/hooks";
import React from "react";
import * as styles from "./Author.module.scss";
import { useSiteMetadata } from "@/hooks";
const Author = () => {
const { author } = useSiteMetadata();
@@ -13,6 +13,7 @@ const Author = () => {
<strong>{author.name}</strong>
</a>
{typeof window !== "undefined" ? (
// eslint-disable-next-line no-undef
<span className="showInPrintView"> {window ? `@ ${window.location}` : ""}</span>
) : (
""

View File

@@ -1,8 +1,8 @@
import { Content } from "@/components/Post/Content";
import * as mocks from "@/mocks";
import { StaticQuery, useStaticQuery } from "gatsby";
import React from "react";
import renderer from "react-test-renderer";
import * as mocks from "@/mocks";
import { Content } from "@/components/Post/Content";
const mockedStaticQuery = StaticQuery as jest.Mock;
const mockedUseStaticQuery = useStaticQuery as jest.Mock;

View File

@@ -1,4 +1,3 @@
import type { Node } from "@/types";
import React from "react";
import { Helmet } from "react-helmet";
import { useSiteMetadata } from "../../hooks";
@@ -8,6 +7,7 @@ import { Content } from "./Content";
import { Meta } from "./Meta";
import * as styles from "./Post.module.scss";
import { Tags } from "./Tags";
import type { Node } from "@/types";
interface Props {
post: Node;

View File

@@ -1,8 +1,8 @@
import { Image } from "@/components/Image";
import { Link, navigate } from "gatsby";
import React, { FunctionComponent } from "react";
import { ThemeSwitcher } from "../ThemeSwitcher/ThemeSwitcher";
import * as styles from "./PostHeader.module.scss";
import { Image } from "@/components/Image";
type Props = { author: { name: string; photo: string } };

View File

@@ -5,7 +5,6 @@ import { Link } from "gatsby";
import * as styles from "./Author.module.scss";
import { Image } from "@/components/Image";
type Props = {
author: {
name: string;

View File

@@ -1,4 +1,3 @@
import { useSiteMetadata } from "@/hooks";
import React from "react";
import { ThemeSwitcher } from "../ThemeSwitcher/ThemeSwitcher";
import { Author } from "./Author";
@@ -6,6 +5,7 @@ import { Contacts } from "./Contacts";
import { Copyright } from "./Copyright";
import { Menu } from "./Menu";
import * as styles from "./Sidebar.module.scss";
import { useSiteMetadata } from "@/hooks";
type Props = {
isIndex?: boolean;