fix eslint on js files
This commit is contained in:
@@ -6,7 +6,7 @@ import Icon, { IconType } from "./Icon";
|
||||
import NavbarDropdownLink from "./NavbarDropdownLink";
|
||||
import NavbarChildLink from "./NavbarChildLink";
|
||||
|
||||
export const renderNavigationItems = (mobile = false) => (
|
||||
export const renderNavigationItems = (mobile = false): JSX.Element => (
|
||||
<>
|
||||
<NavbarDropdownLink to="/kilta" text="Kilta ›" exploded={mobile}>
|
||||
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
||||
|
||||
@@ -7,15 +7,15 @@ interface 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 val = event.target.value;
|
||||
const val = event.target.value as Question["type"];
|
||||
// eslint-disable-next-line no-param-reassign
|
||||
questions[index].type = val;
|
||||
onChange(questions);
|
||||
};
|
||||
|
||||
render() {
|
||||
render(): JSX.Element {
|
||||
const { inputProps } = this.props;
|
||||
const { type, questions, index } = inputProps;
|
||||
const options = optionTypes.map((t) => (
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from "react";
|
||||
import Document, {
|
||||
Html, Head, Main, NextScript, DocumentContext,
|
||||
Html, Head, Main, NextScript, DocumentContext, DocumentInitialProps,
|
||||
} from "next/document";
|
||||
import { ServerStyleSheet } from "styled-components";
|
||||
import Favicons from "@components/Favicons";
|
||||
import HTMLLogo from "@components/HTMLLogo";
|
||||
|
||||
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 originalRenderPage = ctx.renderPage;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user