Merge branch 'master' into 'production'
Prod deploy: Improve image loading See merge request sahkoinsinoorikilta/vtmk/web2.0-frontend!80
This commit is contained in:
+15
-9
@@ -1,12 +1,23 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
parserOptions: {
|
|
||||||
project: "./tsconfig.json"
|
|
||||||
},
|
|
||||||
extends: [
|
extends: [
|
||||||
"plugin:@typescript-eslint/recommended",
|
"plugin:@typescript-eslint/recommended",
|
||||||
"airbnb-typescript",
|
"airbnb-typescript",
|
||||||
"next",
|
"next",
|
||||||
"next/core-web-vitals"
|
"next/core-web-vitals",
|
||||||
|
],
|
||||||
|
parser: '@typescript-eslint/parser',
|
||||||
|
parserOptions: {
|
||||||
|
tsconfigRootDir: __dirname,
|
||||||
|
project: './tsconfig.json',
|
||||||
|
},
|
||||||
|
plugins: ['@typescript-eslint'],
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: ['*.js'],
|
||||||
|
rules: {
|
||||||
|
'@typescript-eslint/no-var-requires': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
rules: {
|
rules: {
|
||||||
"max-len": [
|
"max-len": [
|
||||||
@@ -17,13 +28,8 @@ module.exports = {
|
|||||||
"error",
|
"error",
|
||||||
"double"
|
"double"
|
||||||
],
|
],
|
||||||
"import/prefer-default-export": "warn",
|
|
||||||
"react/jsx-props-no-spreading": "off",
|
|
||||||
"react/prop-types": "off",
|
|
||||||
"react/jsx-one-expression-per-line": "off",
|
"react/jsx-one-expression-per-line": "off",
|
||||||
"eslintreact/jsx-one-expression-per-line": "off",
|
|
||||||
// Temp
|
// Temp
|
||||||
"import/no-cycle": "warn",
|
|
||||||
"react/no-array-index-key": "warn",
|
"react/no-array-index-key": "warn",
|
||||||
"jsx-a11y/label-has-associated-control": "off",
|
"jsx-a11y/label-has-associated-control": "off",
|
||||||
"jsx-a11y/click-events-have-key-events": "off",
|
"jsx-a11y/click-events-have-key-events": "off",
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
_
|
|
||||||
Vendored
+3
@@ -1,3 +1,6 @@
|
|||||||
/// <reference types="next" />
|
/// <reference types="next" />
|
||||||
/// <reference types="next/types/global" />
|
/// <reference types="next/types/global" />
|
||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
|
// NOTE: This file should not be edited
|
||||||
|
// see https://nextjs.org/docs/basic-features/typescript for more information.
|
||||||
|
|||||||
+1
-1
@@ -10,5 +10,5 @@ module.exports = withBundleAnalyzer({
|
|||||||
"static.sahkoinsinoorikilta.fi",
|
"static.sahkoinsinoorikilta.fi",
|
||||||
"api.dev.sahkoinsinoorikilta.fi",
|
"api.dev.sahkoinsinoorikilta.fi",
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Generated
+4465
-4569
File diff suppressed because it is too large
Load Diff
+26
-23
@@ -33,36 +33,38 @@
|
|||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/js-cookie": "^2.2.6",
|
"@types/js-cookie": "^2.2.7",
|
||||||
"@types/react": "^17.0.11",
|
"@types/react": "^17.0.19",
|
||||||
"@types/react-beautiful-dnd": "^13.0.0",
|
"@types/react-beautiful-dnd": "^13.1.1",
|
||||||
"@types/react-csv": "^1.1.1",
|
"@types/react-csv": "^1.1.2",
|
||||||
"@types/react-dom": "^17.0.8",
|
"@types/react-dom": "^17.0.9",
|
||||||
"@types/react-jsonschema-form": "^1.7.5",
|
"@types/react-jsonschema-form": "^1.7.6",
|
||||||
"@types/shortid": "^0.0.29",
|
"@types/shortid": "^0.0.29",
|
||||||
"@types/styled-components": "^5.1.10",
|
"@types/styled-components": "^5.1.12",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.28.1",
|
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
||||||
"babel-plugin-styled-components": "^1.12.0",
|
"@typescript-eslint/parser": "^4.29.2",
|
||||||
"eslint": "^7.29.0",
|
"babel-plugin-styled-components": "^1.13.2",
|
||||||
"eslint-config-airbnb-typescript": "^12.3.1",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-next": "^11.0.1",
|
"eslint-config-airbnb": "^18.2.1",
|
||||||
"husky": "^6.0.0",
|
"eslint-config-airbnb-typescript": "^13.0.0",
|
||||||
"next-sitemap": "^1.6.124",
|
"eslint-config-next": "^11.1.0",
|
||||||
|
"husky": "^7.0.1",
|
||||||
|
"next-sitemap": "^1.6.162",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"stylelint": "^13.13.1",
|
"stylelint": "^13.13.1",
|
||||||
"stylelint-config-standard": "^22.0.0",
|
"stylelint-config-standard": "^22.0.0",
|
||||||
"stylelint-config-styled-components": "^0.1.1",
|
"stylelint-config-styled-components": "^0.1.1",
|
||||||
"testcafe": "^1.14.2",
|
"testcafe": "^1.15.3",
|
||||||
"typescript": "^4.3.2"
|
"typescript": "^4.3.5"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@next/bundle-analyzer": "^11.0.1",
|
"@next/bundle-analyzer": "^11.1.0",
|
||||||
"axios": "^0.21.1",
|
"axios": "^0.21.1",
|
||||||
"date-fns": "^2.22.1",
|
"date-fns": "^2.23.0",
|
||||||
"fast-deep-equal": "^3.1.3",
|
"fast-deep-equal": "^3.1.3",
|
||||||
"js-cookie": "^2.2.1",
|
"js-cookie": "^3.0.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"next": "^11.0.1",
|
"next": "^11.1.0",
|
||||||
"normalize.css": "^8.0.1",
|
"normalize.css": "^8.0.1",
|
||||||
"react": "^17.0.2",
|
"react": "^17.0.2",
|
||||||
"react-beautiful-dnd": "^13.1.0",
|
"react-beautiful-dnd": "^13.1.0",
|
||||||
@@ -70,11 +72,12 @@
|
|||||||
"react-dom": "^17.0.2",
|
"react-dom": "^17.0.2",
|
||||||
"react-is": "^17.0.2",
|
"react-is": "^17.0.2",
|
||||||
"react-jsonschema-form": "^1.8.1",
|
"react-jsonschema-form": "^1.8.1",
|
||||||
"react-markdown": "^6.0.2",
|
"react-markdown": "^7.0.0",
|
||||||
"react-mde": "^11.5.0",
|
"react-mde": "^11.5.0",
|
||||||
"react-toastify": "^7.0.4",
|
"react-toastify": "^7.0.4",
|
||||||
"rehype-raw": "^5.1.0",
|
"rehype-raw": "^6.0.0",
|
||||||
"rehype-sanitize": "^4.0.0",
|
"rehype-sanitize": "^5.0.0",
|
||||||
|
"sharp": "^0.29.0",
|
||||||
"shortid": "^2.2.16",
|
"shortid": "^2.2.16",
|
||||||
"styled-components": "^5.3.0",
|
"styled-components": "^5.3.0",
|
||||||
"swr": "^0.5.6"
|
"swr": "^0.5.6"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Icon, { IconType } from "./Icon";
|
|||||||
import NavbarDropdownLink from "./NavbarDropdownLink";
|
import NavbarDropdownLink from "./NavbarDropdownLink";
|
||||||
import NavbarChildLink from "./NavbarChildLink";
|
import NavbarChildLink from "./NavbarChildLink";
|
||||||
|
|
||||||
export const renderNavigationItems = (mobile = false) => (
|
export const renderNavigationItems = (mobile = false): JSX.Element => (
|
||||||
<>
|
<>
|
||||||
<NavbarDropdownLink to="/kilta" text="Kilta ›" exploded={mobile}>
|
<NavbarDropdownLink to="/kilta" text="Kilta ›" exploded={mobile}>
|
||||||
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
||||||
|
|||||||
@@ -7,15 +7,15 @@ interface TypeWidgetProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class TypeWidget extends React.Component<TypeWidgetProps> {
|
class TypeWidget extends React.Component<TypeWidgetProps> {
|
||||||
handleTypeChange = (questions: Question[], index: number) => (event) => {
|
handleTypeChange = (questions: Question[], index: number): React.ChangeEventHandler<HTMLSelectElement> => (event) => {
|
||||||
const { onChange } = this.props;
|
const { onChange } = this.props;
|
||||||
const val = event.target.value;
|
const val = event.target.value as Question["type"];
|
||||||
// eslint-disable-next-line no-param-reassign
|
// eslint-disable-next-line no-param-reassign
|
||||||
questions[index].type = val;
|
questions[index].type = val;
|
||||||
onChange(questions);
|
onChange(questions);
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render(): JSX.Element {
|
||||||
const { inputProps } = this.props;
|
const { inputProps } = this.props;
|
||||||
const { type, questions, index } = inputProps;
|
const { type, questions, index } = inputProps;
|
||||||
const options = optionTypes.map((t) => (
|
const options = optionTypes.map((t) => (
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import Document, {
|
import Document, {
|
||||||
Html, Head, Main, NextScript, DocumentContext,
|
Html, Head, Main, NextScript, DocumentContext, DocumentInitialProps,
|
||||||
} from "next/document";
|
} from "next/document";
|
||||||
import { ServerStyleSheet } from "styled-components";
|
import { ServerStyleSheet } from "styled-components";
|
||||||
import Favicons from "@components/Favicons";
|
import Favicons from "@components/Favicons";
|
||||||
import HTMLLogo from "@components/HTMLLogo";
|
import HTMLLogo from "@components/HTMLLogo";
|
||||||
|
|
||||||
export default class MyDocument extends Document<{ styleTags: unknown }> {
|
export default class MyDocument extends Document<{ styleTags: unknown }> {
|
||||||
static async getInitialProps(ctx: DocumentContext) {
|
static async getInitialProps(ctx: DocumentContext): Promise<DocumentInitialProps> {
|
||||||
const sheet = new ServerStyleSheet();
|
const sheet = new ServerStyleSheet();
|
||||||
const originalRenderPage = ctx.renderPage;
|
const originalRenderPage = ctx.renderPage;
|
||||||
try {
|
try {
|
||||||
|
|||||||
+4
-1
@@ -57,7 +57,10 @@
|
|||||||
"include": [
|
"include": [
|
||||||
"./src/**/*",
|
"./src/**/*",
|
||||||
"./types/**/*",
|
"./types/**/*",
|
||||||
"./tests/testcafe/**/*"
|
"./tests/testcafe/**/*",
|
||||||
|
"next-sitemap.js",
|
||||||
|
"next.config.js",
|
||||||
|
".eslintrc.js"
|
||||||
],
|
],
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules"
|
"node_modules"
|
||||||
|
|||||||
Reference in New Issue
Block a user