refactor(starter): upgrade to new version of gatsby

This commit is contained in:
Alexander Shelepenok
2022-01-09 20:12:31 +00:00
parent 84bdc5899d
commit 67ebabbaac
397 changed files with 26665 additions and 34984 deletions

View File

@@ -1,15 +0,0 @@
// @flow strict
import React from 'react';
import styles from './Copyright.module.scss';
type Props = {
copyright: string
};
const Copyright = ({ copyright }: Props) => (
<div className={styles['copyright']}>
{copyright}
</div>
);
export default Copyright;

View File

@@ -1,7 +1,9 @@
@import '../../../assets/scss/variables';
@import '../../../assets/scss/mixins';
@use "sass:color";
@import "../../../assets/scss/variables";
@import "../../../assets/scss/mixins";
.copyright {
color: lighten($color-gray, 18%);
color: color.adjust($color-gray, 18%);
font-size: $typographic-small-font-size;
}
}

View File

@@ -1,15 +0,0 @@
// @flow strict
import React from 'react';
import renderer from 'react-test-renderer';
import Copyright from './Copyright';
describe('Copyright', () => {
it('renders correctly', () => {
const props = {
copyright: 'copyright'
};
const tree = renderer.create(<Copyright {...props} />).toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@@ -0,0 +1,12 @@
import React from "react";
import renderer from "react-test-renderer";
import { Copyright } from "@/components/Sidebar/Copyright";
describe("Copyright", () => {
it("renders correctly", () => {
const props = { copyright: "copyright" };
const tree = renderer.create(<Copyright {...props} />).toJSON();
expect(tree).toMatchSnapshot();
});
});

View File

@@ -0,0 +1,13 @@
import React from "react";
import styles from "./Copyright.module.scss";
type Props = {
copyright: string;
};
const Copyright = ({ copyright }: Props) => (
<div className={styles.copyright}>{copyright}</div>
);
export default Copyright;

View File

@@ -1,2 +0,0 @@
// @flow strict
export { default } from './Copyright';

View File

@@ -0,0 +1 @@
export { default as Copyright } from "./Copyright";