refactor: move layout.tsx to web/display

https://metaforecast.org/layout is not a real page, so it shouldn't be
in src/pages.
This commit is contained in:
Vyacheslav Matyukhin 2022-03-26 04:15:07 +03:00
parent 9c586c6ec1
commit 1b1c0f4228
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
6 changed files with 11 additions and 12 deletions

View File

@ -2,7 +2,7 @@ import React from 'react';
import ReactMarkdown from 'react-markdown';
import gfm from 'remark-gfm';
import Layout from './layout';
import Layout from '../web/display/layout';
let readmeMarkdownText = `# About

View File

@ -2,9 +2,9 @@ import { NextPage } from 'next';
import React from 'react';
import { displayForecastsWrapperForCapture } from '../web/display/displayForecastsWrappers';
import Layout from '../web/display/layout';
import { Props } from '../web/search/anySearchPage';
import CommonDisplay from '../web/search/CommonDisplay';
import Layout from './layout';
export { getServerSideProps } from "../web/search/anySearchPage";

View File

@ -6,8 +6,8 @@ import { useState } from 'react';
import { DashboardCreator } from '../web/display/dashboardCreator';
import displayForecasts from '../web/display/displayForecasts';
import Layout from '../web/display/layout';
import { getDashboardForecastsByDashboardId } from '../web/worker/getDashboardForecasts';
import Layout from './layout';
/* get Props */

View File

@ -2,9 +2,9 @@ import { NextPage } from 'next';
import React from 'react';
import { displayForecastsWrapperForSearch } from '../web/display/displayForecastsWrappers';
import Layout from '../web/display/layout';
import { Props } from '../web/search/anySearchPage';
import CommonDisplay from '../web/search/CommonDisplay';
import Layout from './layout';
export { getServerSideProps } from "../web/search/anySearchPage";

View File

@ -1,7 +1,7 @@
import Link from 'next/link';
import React from 'react';
import Layout from './layout';
import Layout from '../web/display/layout';
/* Display one tool */
function displayTool({

View File

@ -1,12 +1,11 @@
import Head from 'next/head';
import Link from 'next/link';
import React from 'react';
import React, { ErrorInfo } from 'react';
// import { GiDiceEightFacesEight } from "react-icons/gi";
import { Logo2 } from '../web/icons/index';
import { Logo2 } from '../icons/index';
/* Utilities */
const classNameSelected = (isSelected) =>
const classNameSelected = (isSelected: boolean) =>
`no-underline py-4 px-2 ml-4 text-md font-medium cursor-pointer border-b-2 border-transparent ${
isSelected
? "text-blue-700 border-blue-700"
@ -27,16 +26,16 @@ let calculateLastUpdate = () => {
// Error catcher
class ErrorBoundary extends React.Component<
any,
{},
{ error: any; errorInfo: any }
> {
// https://reactjs.org/docs/error-boundaries.html
constructor(props) {
constructor(props: {}) {
super(props);
this.state = { error: null, errorInfo: null };
}
componentDidCatch(error, errorInfo) {
componentDidCatch(error: Error, errorInfo: ErrorInfo) {
// Catch errors in any components below and re-render with error message
this.setState({
error: error,