Remove esmodule interop
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import React, { Fragment, Component } from "react";
|
||||
import * as React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
// @ts-ignore
|
||||
import * as TitleImage from "../../assets/img/SIK_RGB_W_side.png";
|
||||
@@ -7,17 +7,17 @@ import "./AdminHeader.scss";
|
||||
export interface AdminHeaderProps { }
|
||||
export interface AdminHeaderState { }
|
||||
|
||||
class AdminHeader extends Component<AdminHeaderProps, AdminHeaderState> {
|
||||
class AdminHeader extends React.Component<AdminHeaderProps, AdminHeaderState> {
|
||||
render() {
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<header className="header admin-header">
|
||||
<Link to="/">
|
||||
<img src={TitleImage} />
|
||||
</Link>
|
||||
<div className="heading">Admin panel</div>
|
||||
</header>
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { Fragment, Component } from "react";
|
||||
import * as React from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import "./Header.scss";
|
||||
import NavbarDropdownLink from "../NavbarDropdownLink/NavbarDropdownLink";
|
||||
@@ -12,7 +12,7 @@ export interface HeaderState {
|
||||
mobileMenuOpen: boolean;
|
||||
}
|
||||
|
||||
class Header extends Component<HeaderProps, HeaderState> {
|
||||
class Header extends React.Component<HeaderProps, HeaderState> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
@@ -22,7 +22,7 @@ class Header extends Component<HeaderProps, HeaderState> {
|
||||
|
||||
renderNavigationDesktopItems = () => {
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<NavbarDropdownLink to="/kilta" text="Kilta ›">
|
||||
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
||||
<NavbarChildLink to="/kilta/fuksi">Fuksi</NavbarChildLink>
|
||||
@@ -34,13 +34,13 @@ class Header extends Component<HeaderProps, HeaderState> {
|
||||
{/* <NavbarChildLink to="https://en.wikipedia.org/wiki/Gay">Simo Höglund</NavbarChildLink> */}
|
||||
</NavbarDropdownLink>
|
||||
<NavbarDropdownLink to="/in_english" text="In English"></NavbarDropdownLink>
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
renderNavigationMobileItems = () => {
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<NavbarDropdownLink to="/kilta" text="Kilta ›" exploded>
|
||||
<NavbarChildLink to="/kilta/toiminta">Toiminta</NavbarChildLink>
|
||||
<NavbarChildLink to="/kilta/fuksi">Fuksi</NavbarChildLink>
|
||||
@@ -52,7 +52,7 @@ class Header extends Component<HeaderProps, HeaderState> {
|
||||
{/* <NavbarChildLink to="https://en.wikipedia.org/wiki/Gay">Simo Höglund</NavbarChildLink> */}
|
||||
</NavbarDropdownLink>
|
||||
<NavbarDropdownLink to="/in_english" text="In English" exploded />
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ class Header extends Component<HeaderProps, HeaderState> {
|
||||
const { mobileMenuOpen } = this.state;
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<div className="header">
|
||||
<Link to="/">
|
||||
<img className="logo" src={TitleImage} />
|
||||
@@ -81,7 +81,7 @@ class Header extends Component<HeaderProps, HeaderState> {
|
||||
<div className="navigation-mobile-menu" hidden={!mobileMenuOpen}>
|
||||
{mobileItems}
|
||||
</div>
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { Fragment } from "react";
|
||||
import * as React from "react";
|
||||
import "./NavbarDropdownLink.scss";
|
||||
import DropDownBox from "../DropDownBox/DropDownBox";
|
||||
import Anchor from "../Anchor";
|
||||
@@ -53,12 +53,12 @@ class NavbarDropdownLink extends React.Component<NavbarDropdownLinkProps, Navbar
|
||||
|
||||
if (exploded) {
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<Anchor className="navbar-dropdown-link"
|
||||
to={this.props.to}
|
||||
>{text}</Anchor>
|
||||
{children}
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { Fragment } from "react";
|
||||
import * as React from "react";
|
||||
import "./Navigation.scss";
|
||||
import NavbarDropdownLink from "../NavbarDropdownLink/NavbarDropdownLink";
|
||||
import NavbarChildLink from "../NavbarChildLink/NavbarChildLink";
|
||||
@@ -30,7 +30,7 @@ class Navigation extends React.Component<NavigationProps, NavigationState> {
|
||||
const { menuOpen } = this.state;
|
||||
const { items } = this.props;
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<div className="navigation">
|
||||
{items}
|
||||
<div className="navigation-some">
|
||||
@@ -42,7 +42,7 @@ class Navigation extends React.Component<NavigationProps, NavigationState> {
|
||||
<Icon name={IconType.HamburgerMenu} onClick={this.handleMobileMenuClick} />
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import React, { Component } from "react";
|
||||
import * as React from "react";
|
||||
|
||||
export interface QuestionProps {
|
||||
children: any;
|
||||
onRemove: () => any;
|
||||
}
|
||||
|
||||
class Question extends Component<QuestionProps> {
|
||||
class Question extends React.Component<QuestionProps> {
|
||||
render() {
|
||||
const { children, onRemove } = this.props;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, { Component } from "react";
|
||||
import * as React from "react";
|
||||
import * as shortid from "shortid";
|
||||
import { Draggable } from "react-beautiful-dnd";
|
||||
import { Question, InputProps, optionTypes, SignupQuestionError } from "./index";
|
||||
@@ -14,7 +14,7 @@ export interface QuestionListProps {
|
||||
}
|
||||
export interface QuestionListState { }
|
||||
|
||||
class QuestionList extends Component<QuestionListProps, QuestionListState> {
|
||||
class QuestionList extends React.Component<QuestionListProps, QuestionListState> {
|
||||
renderTextWidget = ({ questions, value, index }: InputProps) => (
|
||||
<input type="text" value={value} onChange={this.handleNameInputChange(questions, index)} />
|
||||
)
|
||||
|
||||
+4
-4
@@ -1,4 +1,4 @@
|
||||
import React, { Component, Fragment } from "react";
|
||||
import * as React from "react";
|
||||
import { Switch, Route, Redirect } from "react-router-dom";
|
||||
import Helmet from "react-helmet";
|
||||
import FrontPage from "./pages/FrontPage";
|
||||
@@ -68,10 +68,10 @@ const adminRoutes = [
|
||||
{ path: "/admin", page: AdminFrontPage },
|
||||
];
|
||||
|
||||
class Routes extends Component {
|
||||
class Routes extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<Fragment>
|
||||
<React.Fragment>
|
||||
<Helmet>
|
||||
<title>Aalto-yliopiston Sähköinsinoorikilta ry</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
|
||||
@@ -89,7 +89,7 @@ class Routes extends Component {
|
||||
{adminRoutes.map(r => <Route key={r.path} exact path={r.path} render={renderAdminPage(r.page)} />)}
|
||||
<Route component={NotFoundPage} />
|
||||
</Switch>
|
||||
</Fragment>
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"esModuleInterop": true,
|
||||
"outDir": "./dist/",
|
||||
"sourceMap": true,
|
||||
"noImplicitAny": false,
|
||||
|
||||
Reference in New Issue
Block a user