mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-09-18 06:00:40 +02:00
chore: update
This commit is contained in:
@@ -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: {
|
||||
|
@@ -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
|
||||
|
@@ -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;
|
||||
|
@@ -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();
|
||||
});
|
||||
});
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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>
|
||||
) : (
|
||||
""
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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 } };
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user