style: bring back double quotes from prettier
One large commit to avoid dealing with messy patches later on. Turns out I had https://marketplace.visualstudio.com/items?itemName=amatiasq.sort-imports installed with single quotes which messed up all double quotes from prettier.
This commit is contained in:
parent
7c0ad75bea
commit
066eb0302a
|
@ -1,4 +1,4 @@
|
|||
import { pgRead, pgReadWithReadCredentials, pgUpsert } from './pg-wrapper';
|
||||
import { pgRead, pgReadWithReadCredentials, pgUpsert } from "./pg-wrapper";
|
||||
|
||||
const dateUpToYear = () => new Date().toISOString().slice(0, 4);
|
||||
const dateUpToMonth = () =>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import pkg from 'pg';
|
||||
import pkg from "pg";
|
||||
|
||||
import { platformNames } from '../platforms/all/platformNames';
|
||||
import { hash } from '../utils/hash';
|
||||
import { roughSizeOfObject } from '../utils/roughSize';
|
||||
import { platformNames } from "../platforms/all/platformNames";
|
||||
import { hash } from "../utils/hash";
|
||||
import { roughSizeOfObject } from "../utils/roughSize";
|
||||
|
||||
const { Pool } = pkg;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { platformFetchers } from '../platforms/all-platforms';
|
||||
import { rebuildAlgoliaDatabase } from '../utils/algolia';
|
||||
import { updateHistory } from './history/updateHistory';
|
||||
import { mergeEverything } from './mergeEverything';
|
||||
import { rebuildNetlifySiteWithNewData } from './rebuildNetliftySiteWithNewData';
|
||||
import { platformFetchers } from "../platforms/all-platforms";
|
||||
import { rebuildAlgoliaDatabase } from "../utils/algolia";
|
||||
import { updateHistory } from "./history/updateHistory";
|
||||
import { mergeEverything } from "./mergeEverything";
|
||||
import { rebuildNetlifySiteWithNewData } from "./rebuildNetliftySiteWithNewData";
|
||||
|
||||
/* Do everything */
|
||||
function sleep(ms) {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { doEverything } from './doEverything';
|
||||
import { doEverything } from "./doEverything";
|
||||
|
||||
doEverything();
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
import { databaseReadWithReadCredentials, databaseUpsert } from '../../database/database-wrapper';
|
||||
import {
|
||||
databaseReadWithReadCredentials,
|
||||
databaseUpsert,
|
||||
} from "../../database/database-wrapper";
|
||||
|
||||
export async function updateHistory() {
|
||||
let latest = await databaseReadWithReadCredentials({ group: "combined" });
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { databaseRead, databaseUpsert } from '../database/database-wrapper';
|
||||
import { platformNames } from '../platforms/all-platforms';
|
||||
import { databaseRead, databaseUpsert } from "../database/database-wrapper";
|
||||
import { platformNames } from "../platforms/all-platforms";
|
||||
|
||||
/* Merge everything */
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
import { applyIfSecretExists } from '../utils/getSecrets';
|
||||
import { applyIfSecretExists } from "../utils/getSecrets";
|
||||
|
||||
async function rebuildNetlifySiteWithNewData_inner(cookie) {
|
||||
let payload = {};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { pgRead, readWritePool } from './database/pg-wrapper';
|
||||
import { pgRead, readWritePool } from "./database/pg-wrapper";
|
||||
|
||||
export async function getFrontpageRaw() {
|
||||
const client = await readWritePool.connect();
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/* Imports */
|
||||
import 'dotenv/config';
|
||||
import "dotenv/config";
|
||||
|
||||
import readline from 'readline';
|
||||
import readline from "readline";
|
||||
|
||||
import { pgInitialize } from './database/pg-wrapper';
|
||||
import { doEverything, tryCatchTryAgain } from './flow/doEverything';
|
||||
import { updateHistory } from './flow/history/updateHistory';
|
||||
import { mergeEverything } from './flow/mergeEverything';
|
||||
import { rebuildNetlifySiteWithNewData } from './flow/rebuildNetliftySiteWithNewData';
|
||||
import { rebuildFrontpage } from './frontpage';
|
||||
import { platformFetchers } from './platforms/all-platforms';
|
||||
import { rebuildAlgoliaDatabase } from './utils/algolia';
|
||||
import { pgInitialize } from "./database/pg-wrapper";
|
||||
import { doEverything, tryCatchTryAgain } from "./flow/doEverything";
|
||||
import { updateHistory } from "./flow/history/updateHistory";
|
||||
import { mergeEverything } from "./flow/mergeEverything";
|
||||
import { rebuildNetlifySiteWithNewData } from "./flow/rebuildNetliftySiteWithNewData";
|
||||
import { rebuildFrontpage } from "./frontpage";
|
||||
import { platformFetchers } from "./platforms/all-platforms";
|
||||
import { rebuildAlgoliaDatabase } from "./utils/algolia";
|
||||
|
||||
/* Support functions */
|
||||
let functions = [
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import 'dotenv/config';
|
||||
import "dotenv/config";
|
||||
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
import { databaseReadWithReadCredentials } from '../database/database-wrapper';
|
||||
import { databaseReadWithReadCredentials } from "../database/database-wrapper";
|
||||
|
||||
let main = async () => {
|
||||
let json = await databaseReadWithReadCredentials({ group: "combined" });
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
import { pgInitialize } from '../database/pg-wrapper';
|
||||
import { pgInitialize } from "../database/pg-wrapper";
|
||||
|
||||
pgInitialize();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
|
||||
/* This is necessary for estimize, the database of x-risk estimates, and for the OpenPhil/GiveWell predictions. Unlike the others, I'm not fetching them constantly, but only once. */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Imports */
|
||||
import { goodjudgment } from '../platforms/goodjudgment-fetch';
|
||||
import { goodjudgment } from "../platforms/goodjudgment-fetch";
|
||||
|
||||
/* Definitions */
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
import { betfair } from '../betfair-fetch';
|
||||
import { fantasyscotus } from '../fantasyscotus-fetch';
|
||||
import { foretold } from '../foretold-fetch';
|
||||
import { goodjudgment } from '../goodjudgment-fetch';
|
||||
import { goodjudgmentopen } from '../goodjudmentopen-fetch';
|
||||
import { infer } from '../infer-fetch';
|
||||
import { kalshi } from '../kalshi-fetch';
|
||||
import { manifoldmarkets } from '../manifoldmarkets-fetch';
|
||||
import { metaculus } from '../metaculus-fetch';
|
||||
import { polymarket } from '../polymarket-fetch';
|
||||
import { predictit } from '../predictit-fetch';
|
||||
import { rootclaim } from '../rootclaim-fetch';
|
||||
import { smarkets } from '../smarkets-fetch';
|
||||
import { wildeford } from '../wildeford-fetch';
|
||||
import { betfair } from "../betfair-fetch";
|
||||
import { fantasyscotus } from "../fantasyscotus-fetch";
|
||||
import { foretold } from "../foretold-fetch";
|
||||
import { goodjudgment } from "../goodjudgment-fetch";
|
||||
import { goodjudgmentopen } from "../goodjudmentopen-fetch";
|
||||
import { infer } from "../infer-fetch";
|
||||
import { kalshi } from "../kalshi-fetch";
|
||||
import { manifoldmarkets } from "../manifoldmarkets-fetch";
|
||||
import { metaculus } from "../metaculus-fetch";
|
||||
import { polymarket } from "../polymarket-fetch";
|
||||
import { predictit } from "../predictit-fetch";
|
||||
import { rootclaim } from "../rootclaim-fetch";
|
||||
import { smarkets } from "../smarkets-fetch";
|
||||
import { wildeford } from "../wildeford-fetch";
|
||||
|
||||
/* Deprecated
|
||||
import { astralcodexten } from "../platforms/astralcodexten-fetch"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
|
||||
/* Definitions */
|
||||
let endpoint = "https://example.com/";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
|
||||
/* Definitions */
|
||||
let unixtime = new Date().getTime();
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import fs from 'fs';
|
||||
import axios from "axios";
|
||||
import fs from "fs";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
|
||||
/* Support functions */
|
||||
async function fetchPage(url) {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import { Tabletojson } from 'tabletojson';
|
||||
import tunnel from 'tunnel';
|
||||
import axios from "axios";
|
||||
import { Tabletojson } from "tabletojson";
|
||||
import tunnel from "tunnel";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { hash } from '../utils/hash';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { hash } from "../utils/hash";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
|
||||
/* Definitions */
|
||||
let endpoint = "https://goodjudgment.io/superforecasts/";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import { Tabletojson } from 'tabletojson';
|
||||
import axios from "axios";
|
||||
import { Tabletojson } from "tabletojson";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { applyIfSecretExists } from '../utils/getSecrets';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import toMarkdown from '../utils/toMarkdown';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { applyIfSecretExists } from "../utils/getSecrets";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
import toMarkdown from "../utils/toMarkdown";
|
||||
|
||||
/* Definitions */
|
||||
let htmlEndPoint = "https://www.gjopen.com/questions?page=";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import { Tabletojson } from 'tabletojson';
|
||||
import axios from "axios";
|
||||
import { Tabletojson } from "tabletojson";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { applyIfSecretExists } from '../utils/getSecrets';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import toMarkdown from '../utils/toMarkdown';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { applyIfSecretExists } from "../utils/getSecrets";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
import toMarkdown from "../utils/toMarkdown";
|
||||
|
||||
/* Definitions */
|
||||
let htmlEndPoint = "https://www.infer-pub.com/questions";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
|
||||
/* Definitions */
|
||||
let htmlEndPointEntrance = "https://api.smarkets.com/v3/events/";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* Imports */
|
||||
// import axios from "axios"
|
||||
import { GoogleSpreadsheet } from 'google-spreadsheet';
|
||||
import { GoogleSpreadsheet } from "google-spreadsheet";
|
||||
|
||||
import { databaseUpsert } from '../database/database-wrapper';
|
||||
import { applyIfSecretExists } from '../utils/getSecrets';
|
||||
import { hash } from '../utils/hash';
|
||||
import { calculateStars } from '../utils/stars';
|
||||
import { databaseUpsert } from "../database/database-wrapper";
|
||||
import { applyIfSecretExists } from "../utils/getSecrets";
|
||||
import { hash } from "../utils/hash";
|
||||
import { calculateStars } from "../utils/stars";
|
||||
|
||||
/* Definitions */
|
||||
const SHEET_ID = "1xcgYF7Q0D95TPHLLSgwhWBHFrWZUGJn7yTyAhDR4vi0"; // spreadsheet key is the long id in the sheets URL
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import algoliasearch from 'algoliasearch';
|
||||
import algoliasearch from "algoliasearch";
|
||||
|
||||
import { databaseReadWithReadCredentials } from '../database/database-wrapper';
|
||||
import { mergeEverythingInner } from '../flow/mergeEverything';
|
||||
import { databaseReadWithReadCredentials } from "../database/database-wrapper";
|
||||
import { mergeEverythingInner } from "../flow/mergeEverything";
|
||||
|
||||
let cookie = process.env.ALGOLIA_MASTER_API_KEY;
|
||||
const client = algoliasearch("96UD3NTQ7L", cookie);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
import { databaseReadWithReadCredentials } from '../../database/database-wrapper';
|
||||
import { databaseReadWithReadCredentials } from "../../database/database-wrapper";
|
||||
|
||||
/* Definitions */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
import { databaseReadWithReadCredentials } from '../../database/database-wrapper';
|
||||
import { databaseReadWithReadCredentials } from "../../database/database-wrapper";
|
||||
|
||||
/* Definitions */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import crypto from 'crypto';
|
||||
import crypto from "crypto";
|
||||
|
||||
export const hash = (string: string) =>
|
||||
crypto.createHash("sha256").update(string).digest("hex").slice(0, 10);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
/* Definitions */
|
||||
let locationData = "../../input";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
/* Definitions */
|
||||
let locationData = "../../data/";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
/* Definitions */
|
||||
let locationData = "../../data/";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
import { databaseReadWithReadCredentials } from '../../database/database-wrapper';
|
||||
import { databaseReadWithReadCredentials } from "../../database/database-wrapper";
|
||||
|
||||
/* Definitions */
|
||||
let locationData = "./data/";
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Imports */
|
||||
import fs from 'fs';
|
||||
import fs from "fs";
|
||||
|
||||
/* Definitions */
|
||||
let locationData = "./data/";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
let elicitEndpoint =
|
||||
"https://elicit.org/api/v1/binary-questions/csv?binaryQuestions.resolved=false&binaryQuestions.search=&binaryQuestions.sortBy=popularity&predictors=community";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next/types';
|
||||
import { NextApiRequest, NextApiResponse } from "next/types";
|
||||
|
||||
import { getFrontpageFullRaw } from '../../backend/frontpage';
|
||||
import { getFrontpageFullRaw } from "../../backend/frontpage";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import crypto from 'crypto';
|
||||
import { NextApiRequest, NextApiResponse } from 'next/types';
|
||||
import crypto from "crypto";
|
||||
import { NextApiRequest, NextApiResponse } from "next/types";
|
||||
|
||||
import { pgInsertIntoDashboard } from '../../backend/database/pg-wrapper';
|
||||
import { pgInsertIntoDashboard } from "../../backend/database/pg-wrapper";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next/types';
|
||||
import { NextApiRequest, NextApiResponse } from "next/types";
|
||||
|
||||
import { pgGetByIds } from '../../backend/database/pg-wrapper';
|
||||
import { pgGetByIds } from "../../backend/database/pg-wrapper";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next/types';
|
||||
import { NextApiRequest, NextApiResponse } from "next/types";
|
||||
|
||||
import { getFrontpageRaw } from '../../backend/frontpage';
|
||||
import { getFrontpageRaw } from "../../backend/frontpage";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next/types';
|
||||
import { NextApiRequest, NextApiResponse } from "next/types";
|
||||
|
||||
import { pgRead } from '../../backend/database/pg-wrapper';
|
||||
import { pgRead } from "../../backend/database/pg-wrapper";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { NextApiRequest, NextApiResponse } from 'next/types';
|
||||
import { runMePlease } from 'squiggle-experimental/dist/index.js';
|
||||
import { NextApiRequest, NextApiResponse } from "next/types";
|
||||
import { runMePlease } from "squiggle-experimental/dist/index.js";
|
||||
|
||||
export default async function handler(
|
||||
req: NextApiRequest,
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { NextPage } from 'next';
|
||||
import React from 'react';
|
||||
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 { displayForecastsWrapperForCapture } from "../web/display/displayForecastsWrappers";
|
||||
import Layout from "../web/display/layout";
|
||||
import { Props } from "../web/search/anySearchPage";
|
||||
import CommonDisplay from "../web/search/CommonDisplay";
|
||||
|
||||
export { getServerSideProps } from "../web/search/anySearchPage";
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import { GetServerSideProps } from 'next';
|
||||
import { useRouter } from 'next/router'; // https://nextjs.org/docs/api-reference/next/router
|
||||
import { useState } from 'react';
|
||||
import axios from "axios";
|
||||
import { GetServerSideProps } from "next";
|
||||
import { useRouter } from "next/router"; // https://nextjs.org/docs/api-reference/next/router
|
||||
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 { DashboardCreator } from "../web/display/dashboardCreator";
|
||||
import displayForecasts from "../web/display/displayForecasts";
|
||||
import Layout from "../web/display/layout";
|
||||
import { getDashboardForecastsByDashboardId } from "../web/worker/getDashboardForecasts";
|
||||
|
||||
/* get Props */
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import { NextPage } from 'next';
|
||||
import React from 'react';
|
||||
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 { displayForecastsWrapperForSearch } from "../web/display/displayForecastsWrappers";
|
||||
import Layout from "../web/display/layout";
|
||||
import { Props } from "../web/search/anySearchPage";
|
||||
import CommonDisplay from "../web/search/CommonDisplay";
|
||||
|
||||
export { getServerSideProps } from "../web/search/anySearchPage";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useEffect } from 'react';
|
||||
import React, { useEffect } from "react";
|
||||
|
||||
function Recursion() {
|
||||
useEffect(() => {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
/* Imports */
|
||||
|
||||
// React
|
||||
import { useRouter } from 'next/router'; // https://nextjs.org/docs/api-reference/next/router
|
||||
import { useState } from 'react';
|
||||
import { useRouter } from "next/router"; // https://nextjs.org/docs/api-reference/next/router
|
||||
import { useState } from "react";
|
||||
|
||||
import displayForecasts from '../web/display/displayForecasts';
|
||||
import { getDashboardForecastsByDashboardId } from '../web/worker/getDashboardForecasts';
|
||||
import displayForecasts from "../web/display/displayForecasts";
|
||||
import { getDashboardForecastsByDashboardId } from "../web/worker/getDashboardForecasts";
|
||||
|
||||
/* get Props */
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* Imports */
|
||||
|
||||
import React from 'react';
|
||||
import React from "react";
|
||||
|
||||
import { displayForecast } from '../web/display/displayForecasts';
|
||||
import { platformsWithLabels } from '../web/platforms';
|
||||
import searchAccordingToQueryData from '../web/worker/searchAccordingToQueryData';
|
||||
import { displayForecast } from "../web/display/displayForecasts";
|
||||
import { platformsWithLabels } from "../web/platforms";
|
||||
import searchAccordingToQueryData from "../web/worker/searchAccordingToQueryData";
|
||||
|
||||
/* Helper functions */
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import Link from 'next/link';
|
||||
import React from 'react';
|
||||
import Link from "next/link";
|
||||
import React from "react";
|
||||
|
||||
import Layout from '../web/display/layout';
|
||||
import Layout from "../web/display/layout";
|
||||
|
||||
/* Display one tool */
|
||||
function displayTool({
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React from "react";
|
||||
|
||||
interface Props {
|
||||
onChange: (x: number) => void;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useState } from 'react';
|
||||
import React, { useState } from "react";
|
||||
|
||||
let exampleInput = `{
|
||||
"title": "Random example",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* Imports */
|
||||
import React from 'react';
|
||||
import { FaRegClipboard } from 'react-icons/fa';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import React from "react";
|
||||
import { FaRegClipboard } from "react-icons/fa";
|
||||
import ReactMarkdown from "react-markdown";
|
||||
|
||||
/* Definitions */
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import displayForecasts from './displayForecasts';
|
||||
import displayOneForecast from './displayOneForecastForCapture';
|
||||
import displayForecasts from "./displayForecasts";
|
||||
import displayOneForecast from "./displayOneForecastForCapture";
|
||||
|
||||
export function displayForecastsWrapperForSearch({
|
||||
results,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import domtoimage from 'dom-to-image'; // https://github.com/tsayen/dom-to-image
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { CopyToClipboard } from 'react-copy-to-clipboard';
|
||||
import domtoimage from "dom-to-image"; // https://github.com/tsayen/dom-to-image
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { CopyToClipboard } from "react-copy-to-clipboard";
|
||||
|
||||
import { uploadToImgur } from '../worker/uploadToImgur';
|
||||
import { displayForecast } from './displayForecasts';
|
||||
import { uploadToImgur } from "../worker/uploadToImgur";
|
||||
import { displayForecast } from "./displayForecasts";
|
||||
|
||||
function displayOneForecastInner(result, containerRef) {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React from "react";
|
||||
|
||||
export default function Form({ value, onChange, placeholder }) {
|
||||
const handleInputChange = (event) => {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import Head from 'next/head';
|
||||
import Link from 'next/link';
|
||||
import React, { ErrorInfo } from 'react';
|
||||
import Head from "next/head";
|
||||
import Link from "next/link";
|
||||
import React, { ErrorInfo } from "react";
|
||||
|
||||
import { Logo2 } from '../icons/index';
|
||||
import { Logo2 } from "../icons/index";
|
||||
|
||||
/* Utilities */
|
||||
const classNameSelected = (isSelected: boolean) =>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import chroma from 'chroma-js';
|
||||
import React from 'react';
|
||||
import Select from 'react-select';
|
||||
import chroma from "chroma-js";
|
||||
import React from "react";
|
||||
import Select from "react-select";
|
||||
|
||||
import { platformsWithLabels } from '../platforms';
|
||||
import { platformsWithLabels } from "../platforms";
|
||||
|
||||
const colourStyles = {
|
||||
control: (styles) => ({ ...styles, backgroundColor: "white" }),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* Imports */
|
||||
import React from 'react';
|
||||
import { Handles, Rail, Slider, Tracks } from 'react-compound-slider';
|
||||
import React from "react";
|
||||
import { Handles, Rail, Slider, Tracks } from "react-compound-slider";
|
||||
|
||||
// https://sghall.github.io/react-compound-slider/#/getting-started/tutorial
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
function SvgFavicon(props) {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
function SvgLogo(props) {
|
||||
return (
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import * as React from 'react';
|
||||
import * as React from "react";
|
||||
|
||||
function SvgLogo2(props) {
|
||||
return (
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
import { useRouter } from 'next/router';
|
||||
import React, { DependencyList, EffectCallback, Fragment, useEffect, useState } from 'react';
|
||||
import { useRouter } from "next/router";
|
||||
import React, {
|
||||
DependencyList,
|
||||
EffectCallback,
|
||||
Fragment,
|
||||
useEffect,
|
||||
useState,
|
||||
} from "react";
|
||||
|
||||
import ButtonsForStars from '../display/buttonsForStars';
|
||||
import Form from '../display/form';
|
||||
import MultiSelectPlatform from '../display/multiSelectPlatforms';
|
||||
import { SliderElement } from '../display/slider';
|
||||
import { platformsWithLabels, PlatformWithLabel } from '../platforms';
|
||||
import searchAccordingToQueryData from '../worker/searchAccordingToQueryData';
|
||||
import ButtonsForStars from "../display/buttonsForStars";
|
||||
import Form from "../display/form";
|
||||
import MultiSelectPlatform from "../display/multiSelectPlatforms";
|
||||
import { SliderElement } from "../display/slider";
|
||||
import { platformsWithLabels, PlatformWithLabel } from "../platforms";
|
||||
import searchAccordingToQueryData from "../worker/searchAccordingToQueryData";
|
||||
|
||||
interface QueryParametersWithoutNum {
|
||||
query: string;
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
import { GetServerSideProps } from 'next';
|
||||
import { GetServerSideProps } from "next";
|
||||
|
||||
import { getFrontpage } from '../../backend/frontpage';
|
||||
import searchAccordingToQueryData from '../worker/searchAccordingToQueryData';
|
||||
import { defaultNumDisplay, defaultQueryParameters, QueryParameters } from './CommonDisplay';
|
||||
import { getFrontpage } from "../../backend/frontpage";
|
||||
import searchAccordingToQueryData from "../worker/searchAccordingToQueryData";
|
||||
import {
|
||||
defaultNumDisplay,
|
||||
defaultQueryParameters,
|
||||
QueryParameters,
|
||||
} from "./CommonDisplay";
|
||||
|
||||
/* Common code for / and /capture */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
export async function getDashboardForecastsByDashboardId({ dashboardId }) {
|
||||
console.log("getDashboardForecastsByDashboardId: ");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import searchGuesstimate from './searchGuesstimate';
|
||||
import searchWithAlgolia from './searchWithAlgolia';
|
||||
import searchGuesstimate from "./searchGuesstimate";
|
||||
import searchWithAlgolia from "./searchWithAlgolia";
|
||||
|
||||
export default async function searchAccordingToQueryData(queryData) {
|
||||
let results = [];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* Imports */
|
||||
import axios from 'axios';
|
||||
import axios from "axios";
|
||||
|
||||
/* Definitions */
|
||||
let urlEndPoint =
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import algoliasearch from 'algoliasearch';
|
||||
import algoliasearch from "algoliasearch";
|
||||
|
||||
const client = algoliasearch("96UD3NTQ7L", "618dbd0092971388cfd43aac1ae5f1f5"); // Only search.
|
||||
const index = client.initIndex("metaforecast");
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// import fetch from "fetch"
|
||||
import axios, { AxiosRequestConfig } from 'axios';
|
||||
import axios, { AxiosRequestConfig } from "axios";
|
||||
|
||||
export async function uploadToImgur(dataURL, handleGettingImgurlImage) {
|
||||
let request: AxiosRequestConfig = {
|
||||
|
|
Loading…
Reference in New Issue
Block a user