cleanup w new version of react
This commit is contained in:
parent
34e1359872
commit
7717b3a76b
|
@ -7,8 +7,7 @@
|
|||
*/
|
||||
|
||||
import { useState } from "react";
|
||||
// eslint-disable-next-line
|
||||
import { BrowserRouter as Router, Route, withRouter, Switch, RouteComponentProps } from "react-router-dom";
|
||||
import { Route, withRouter, Switch, RouteComponentProps } from "react-router-dom";
|
||||
import "./App.css";
|
||||
import Page404 from "./pages/404";
|
||||
import Chapter from "./components/Chapter";
|
||||
|
@ -44,10 +43,12 @@ function App(props: RouteComponentProps) {
|
|||
}
|
||||
useEffect(() => {
|
||||
logAnalytics();
|
||||
// eslint-disable-next-line
|
||||
}, []);
|
||||
useEffect(() => {
|
||||
window.scroll(0, 0);
|
||||
logAnalytics();
|
||||
// eslint-disable-next-line
|
||||
}, [props.location.pathname, user]);
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
import TableOfContents from "./TableOfContents";
|
||||
import Footer from "./Footer";
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Types as T,
|
||||
Examples,
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
// eslint-disable-next-line
|
||||
import { BrowserRouter as Router, Link } from "react-router-dom";
|
||||
import { Link } from "react-router-dom";
|
||||
import leftChevron from "./chevron_left-24px.svg";
|
||||
import rightChevron from "./chevron_right-24px.svg";
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import {
|
||||
InlinePs,
|
||||
defaultTextOptions as opts,
|
||||
|
|
|
@ -6,9 +6,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import React from "react";
|
||||
// eslint-disable-next-line
|
||||
import { BrowserRouter as Router, Link } from "react-router-dom";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useUser } from "../user-context";
|
||||
|
||||
const hamburger = <svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24">
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import buttonUnpressed from "../images/button-unpressed.png";
|
||||
import buttonHalfPressed from "../images/button-half-pressed.png";
|
||||
import buttonFullyPressed from "../images/button-fully-pressed.png";
|
||||
|
|
|
@ -6,9 +6,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import React, { useState } from "react";
|
||||
// eslint-disable-next-line
|
||||
import { BrowserRouter as Router, Link } from "react-router-dom";
|
||||
import { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import classNames from "classnames";
|
||||
import SmoothCollapse from "react-smooth-collapse";
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Examples,
|
||||
} from "@lingdocs/pashto-inflector";
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { NavHashLink } from 'react-router-hash-link';
|
||||
import Scrollspy from 'react-scrollspy';
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
// import "./formula.css";
|
||||
// import teacher from "./teacher-small.png";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from "react";
|
||||
import { Component } from "react";
|
||||
import classNames from "classnames";
|
||||
import highlightExample from "./highlight-example";
|
||||
import {
|
||||
|
@ -16,7 +16,7 @@ interface IAppState {
|
|||
view: ViewOptions;
|
||||
}
|
||||
|
||||
class PhoneticsViewer extends React.Component<any, IAppState> {
|
||||
class PhoneticsViewer extends Component<any, IAppState> {
|
||||
constructor(props: any) {
|
||||
super(props);
|
||||
this.state = {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import { Types as T } from "@lingdocs/pashto-inflector";
|
||||
|
||||
interface ILetter {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import {
|
||||
Types as T,
|
||||
} from "@lingdocs/pashto-inflector";
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import { useUser } from "../user-context";
|
||||
|
||||
function GameDisplay({ record: { title, Game, id } }: { record: GameRecord }) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import GenderGame from "./sub-cores/GenderGame";
|
||||
import UnisexNounGame from "./sub-cores/UnisexNounGame";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import { StrictMode } from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import App from './App';
|
||||
import * as serviceWorkerRegistration from './serviceWorkerRegistration';
|
||||
|
@ -9,13 +9,13 @@ import "@fortawesome/fontawesome-free/css/all.css";
|
|||
import reportWebVitals from './reportWebVitals';
|
||||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<StrictMode>
|
||||
<Router>
|
||||
<UserProvider>
|
||||
<App />
|
||||
</UserProvider>
|
||||
</Router>
|
||||
</React.StrictMode>,
|
||||
</StrictMode>,
|
||||
document.getElementById('root')
|
||||
);
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import React from "react";
|
||||
import Markdown from "markdown-to-jsx";
|
||||
|
||||
export default function mdps(input) {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
*
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Link } from "react-router-dom";
|
||||
import Footer from "../components/Footer";
|
||||
import { content } from "../content/index";
|
||||
|
|
Loading…
Reference in New Issue