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:
Vyacheslav Matyukhin 2022-03-28 20:59:07 +03:00
parent 7c0ad75bea
commit 066eb0302a
No known key found for this signature in database
GPG Key ID: 3D2A774C5489F96C
64 changed files with 201 additions and 188 deletions

View File

@ -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 dateUpToYear = () => new Date().toISOString().slice(0, 4);
const dateUpToMonth = () => const dateUpToMonth = () =>

View File

@ -1,8 +1,8 @@
import pkg from 'pg'; import pkg from "pg";
import { platformNames } from '../platforms/all/platformNames'; import { platformNames } from "../platforms/all/platformNames";
import { hash } from '../utils/hash'; import { hash } from "../utils/hash";
import { roughSizeOfObject } from '../utils/roughSize'; import { roughSizeOfObject } from "../utils/roughSize";
const { Pool } = pkg; const { Pool } = pkg;

View File

@ -1,8 +1,8 @@
import { platformFetchers } from '../platforms/all-platforms'; import { platformFetchers } from "../platforms/all-platforms";
import { rebuildAlgoliaDatabase } from '../utils/algolia'; import { rebuildAlgoliaDatabase } from "../utils/algolia";
import { updateHistory } from './history/updateHistory'; import { updateHistory } from "./history/updateHistory";
import { mergeEverything } from './mergeEverything'; import { mergeEverything } from "./mergeEverything";
import { rebuildNetlifySiteWithNewData } from './rebuildNetliftySiteWithNewData'; import { rebuildNetlifySiteWithNewData } from "./rebuildNetliftySiteWithNewData";
/* Do everything */ /* Do everything */
function sleep(ms) { function sleep(ms) {

View File

@ -1,3 +1,3 @@
import { doEverything } from './doEverything'; import { doEverything } from "./doEverything";
doEverything(); doEverything();

View File

@ -1,4 +1,7 @@
import { databaseReadWithReadCredentials, databaseUpsert } from '../../database/database-wrapper'; import {
databaseReadWithReadCredentials,
databaseUpsert,
} from "../../database/database-wrapper";
export async function updateHistory() { export async function updateHistory() {
let latest = await databaseReadWithReadCredentials({ group: "combined" }); let latest = await databaseReadWithReadCredentials({ group: "combined" });

View File

@ -1,5 +1,5 @@
import { databaseRead, databaseUpsert } from '../database/database-wrapper'; import { databaseRead, databaseUpsert } from "../database/database-wrapper";
import { platformNames } from '../platforms/all-platforms'; import { platformNames } from "../platforms/all-platforms";
/* Merge everything */ /* Merge everything */

View File

@ -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) { async function rebuildNetlifySiteWithNewData_inner(cookie) {
let payload = {}; let payload = {};

View File

@ -1,4 +1,4 @@
import { pgRead, readWritePool } from './database/pg-wrapper'; import { pgRead, readWritePool } from "./database/pg-wrapper";
export async function getFrontpageRaw() { export async function getFrontpageRaw() {
const client = await readWritePool.connect(); const client = await readWritePool.connect();

View File

@ -1,16 +1,16 @@
/* Imports */ /* Imports */
import 'dotenv/config'; import "dotenv/config";
import readline from 'readline'; import readline from "readline";
import { pgInitialize } from './database/pg-wrapper'; import { pgInitialize } from "./database/pg-wrapper";
import { doEverything, tryCatchTryAgain } from './flow/doEverything'; import { doEverything, tryCatchTryAgain } from "./flow/doEverything";
import { updateHistory } from './flow/history/updateHistory'; import { updateHistory } from "./flow/history/updateHistory";
import { mergeEverything } from './flow/mergeEverything'; import { mergeEverything } from "./flow/mergeEverything";
import { rebuildNetlifySiteWithNewData } from './flow/rebuildNetliftySiteWithNewData'; import { rebuildNetlifySiteWithNewData } from "./flow/rebuildNetliftySiteWithNewData";
import { rebuildFrontpage } from './frontpage'; import { rebuildFrontpage } from "./frontpage";
import { platformFetchers } from './platforms/all-platforms'; import { platformFetchers } from "./platforms/all-platforms";
import { rebuildAlgoliaDatabase } from './utils/algolia'; import { rebuildAlgoliaDatabase } from "./utils/algolia";
/* Support functions */ /* Support functions */
let functions = [ let functions = [

View File

@ -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 main = async () => {
let json = await databaseReadWithReadCredentials({ group: "combined" }); let json = await databaseReadWithReadCredentials({ group: "combined" });

View File

@ -1,3 +1,3 @@
import { pgInitialize } from '../database/pg-wrapper'; import { pgInitialize } from "../database/pg-wrapper";
pgInitialize(); pgInitialize();

View File

@ -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. */ /* 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. */

View File

@ -1,5 +1,5 @@
/* Imports */ /* Imports */
import { goodjudgment } from '../platforms/goodjudgment-fetch'; import { goodjudgment } from "../platforms/goodjudgment-fetch";
/* Definitions */ /* Definitions */

View File

@ -1,17 +1,17 @@
import { betfair } from '../betfair-fetch'; import { betfair } from "../betfair-fetch";
import { fantasyscotus } from '../fantasyscotus-fetch'; import { fantasyscotus } from "../fantasyscotus-fetch";
import { foretold } from '../foretold-fetch'; import { foretold } from "../foretold-fetch";
import { goodjudgment } from '../goodjudgment-fetch'; import { goodjudgment } from "../goodjudgment-fetch";
import { goodjudgmentopen } from '../goodjudmentopen-fetch'; import { goodjudgmentopen } from "../goodjudmentopen-fetch";
import { infer } from '../infer-fetch'; import { infer } from "../infer-fetch";
import { kalshi } from '../kalshi-fetch'; import { kalshi } from "../kalshi-fetch";
import { manifoldmarkets } from '../manifoldmarkets-fetch'; import { manifoldmarkets } from "../manifoldmarkets-fetch";
import { metaculus } from '../metaculus-fetch'; import { metaculus } from "../metaculus-fetch";
import { polymarket } from '../polymarket-fetch'; import { polymarket } from "../polymarket-fetch";
import { predictit } from '../predictit-fetch'; import { predictit } from "../predictit-fetch";
import { rootclaim } from '../rootclaim-fetch'; import { rootclaim } from "../rootclaim-fetch";
import { smarkets } from '../smarkets-fetch'; import { smarkets } from "../smarkets-fetch";
import { wildeford } from '../wildeford-fetch'; import { wildeford } from "../wildeford-fetch";
/* Deprecated /* Deprecated
import { astralcodexten } from "../platforms/astralcodexten-fetch" import { astralcodexten } from "../platforms/astralcodexten-fetch"

View File

@ -1,8 +1,8 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
/* Definitions */ /* Definitions */
let endpoint = "https://example.com/"; let endpoint = "https://example.com/";

View File

@ -1,8 +1,8 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
/* Definitions */ /* Definitions */
let unixtime = new Date().getTime(); let unixtime = new Date().getTime();

View File

@ -1,9 +1,9 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import fs from 'fs'; import fs from "fs";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
/* Support functions */ /* Support functions */
async function fetchPage(url) { async function fetchPage(url) {

View File

@ -1,11 +1,11 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { Tabletojson } from 'tabletojson'; import { Tabletojson } from "tabletojson";
import tunnel from 'tunnel'; import tunnel from "tunnel";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { hash } from '../utils/hash'; import { hash } from "../utils/hash";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
/* Definitions */ /* Definitions */
let endpoint = "https://goodjudgment.io/superforecasts/"; let endpoint = "https://goodjudgment.io/superforecasts/";

View File

@ -1,11 +1,11 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { Tabletojson } from 'tabletojson'; import { Tabletojson } from "tabletojson";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { applyIfSecretExists } from '../utils/getSecrets'; import { applyIfSecretExists } from "../utils/getSecrets";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
import toMarkdown from '../utils/toMarkdown'; import toMarkdown from "../utils/toMarkdown";
/* Definitions */ /* Definitions */
let htmlEndPoint = "https://www.gjopen.com/questions?page="; let htmlEndPoint = "https://www.gjopen.com/questions?page=";

View File

@ -1,11 +1,11 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { Tabletojson } from 'tabletojson'; import { Tabletojson } from "tabletojson";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { applyIfSecretExists } from '../utils/getSecrets'; import { applyIfSecretExists } from "../utils/getSecrets";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
import toMarkdown from '../utils/toMarkdown'; import toMarkdown from "../utils/toMarkdown";
/* Definitions */ /* Definitions */
let htmlEndPoint = "https://www.infer-pub.com/questions"; let htmlEndPoint = "https://www.infer-pub.com/questions";

View File

@ -1,8 +1,8 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
/* Definitions */ /* Definitions */
let htmlEndPointEntrance = "https://api.smarkets.com/v3/events/"; let htmlEndPointEntrance = "https://api.smarkets.com/v3/events/";

View File

@ -1,11 +1,11 @@
/* Imports */ /* Imports */
// import axios from "axios" // import axios from "axios"
import { GoogleSpreadsheet } from 'google-spreadsheet'; import { GoogleSpreadsheet } from "google-spreadsheet";
import { databaseUpsert } from '../database/database-wrapper'; import { databaseUpsert } from "../database/database-wrapper";
import { applyIfSecretExists } from '../utils/getSecrets'; import { applyIfSecretExists } from "../utils/getSecrets";
import { hash } from '../utils/hash'; import { hash } from "../utils/hash";
import { calculateStars } from '../utils/stars'; import { calculateStars } from "../utils/stars";
/* Definitions */ /* Definitions */
const SHEET_ID = "1xcgYF7Q0D95TPHLLSgwhWBHFrWZUGJn7yTyAhDR4vi0"; // spreadsheet key is the long id in the sheets URL const SHEET_ID = "1xcgYF7Q0D95TPHLLSgwhWBHFrWZUGJn7yTyAhDR4vi0"; // spreadsheet key is the long id in the sheets URL

View File

@ -1,7 +1,7 @@
import algoliasearch from 'algoliasearch'; import algoliasearch from "algoliasearch";
import { databaseReadWithReadCredentials } from '../database/database-wrapper'; import { databaseReadWithReadCredentials } from "../database/database-wrapper";
import { mergeEverythingInner } from '../flow/mergeEverything'; import { mergeEverythingInner } from "../flow/mergeEverything";
let cookie = process.env.ALGOLIA_MASTER_API_KEY; let cookie = process.env.ALGOLIA_MASTER_API_KEY;
const client = algoliasearch("96UD3NTQ7L", cookie); const client = algoliasearch("96UD3NTQ7L", cookie);

View File

@ -1,7 +1,7 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
import { databaseReadWithReadCredentials } from '../../database/database-wrapper'; import { databaseReadWithReadCredentials } from "../../database/database-wrapper";
/* Definitions */ /* Definitions */

View File

@ -1,7 +1,7 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
import { databaseReadWithReadCredentials } from '../../database/database-wrapper'; import { databaseReadWithReadCredentials } from "../../database/database-wrapper";
/* Definitions */ /* Definitions */

View File

@ -1,4 +1,4 @@
import crypto from 'crypto'; import crypto from "crypto";
export const hash = (string: string) => export const hash = (string: string) =>
crypto.createHash("sha256").update(string).digest("hex").slice(0, 10); crypto.createHash("sha256").update(string).digest("hex").slice(0, 10);

View File

@ -1,5 +1,5 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
/* Definitions */ /* Definitions */
let locationData = "../../input"; let locationData = "../../input";

View File

@ -1,5 +1,5 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
/* Definitions */ /* Definitions */
let locationData = "../../data/"; let locationData = "../../data/";

View File

@ -1,5 +1,5 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
/* Definitions */ /* Definitions */
let locationData = "../../data/"; let locationData = "../../data/";

View File

@ -1,7 +1,7 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
import { databaseReadWithReadCredentials } from '../../database/database-wrapper'; import { databaseReadWithReadCredentials } from "../../database/database-wrapper";
/* Definitions */ /* Definitions */
let locationData = "./data/"; let locationData = "./data/";

View File

@ -1,5 +1,5 @@
/* Imports */ /* Imports */
import fs from 'fs'; import fs from "fs";
/* Definitions */ /* Definitions */
let locationData = "./data/"; let locationData = "./data/";

View File

@ -1,4 +1,4 @@
import axios from 'axios'; import axios from "axios";
let elicitEndpoint = let elicitEndpoint =
"https://elicit.org/api/v1/binary-questions/csv?binaryQuestions.resolved=false&binaryQuestions.search=&binaryQuestions.sortBy=popularity&predictors=community"; "https://elicit.org/api/v1/binary-questions/csv?binaryQuestions.resolved=false&binaryQuestions.search=&binaryQuestions.sortBy=popularity&predictors=community";

View File

@ -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( export default async function handler(
req: NextApiRequest, req: NextApiRequest,

View File

@ -1,7 +1,7 @@
import crypto from 'crypto'; import crypto from "crypto";
import { NextApiRequest, NextApiResponse } from 'next/types'; 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( export default async function handler(
req: NextApiRequest, req: NextApiRequest,

View File

@ -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( export default async function handler(
req: NextApiRequest, req: NextApiRequest,

View File

@ -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( export default async function handler(
req: NextApiRequest, req: NextApiRequest,

View File

@ -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( export default async function handler(
req: NextApiRequest, req: NextApiRequest,

View File

@ -1,5 +1,5 @@
import { NextApiRequest, NextApiResponse } from 'next/types'; import { NextApiRequest, NextApiResponse } from "next/types";
import { runMePlease } from 'squiggle-experimental/dist/index.js'; import { runMePlease } from "squiggle-experimental/dist/index.js";
export default async function handler( export default async function handler(
req: NextApiRequest, req: NextApiRequest,

View File

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

View File

@ -1,13 +1,13 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
import { GetServerSideProps } from 'next'; import { GetServerSideProps } from "next";
import { useRouter } from 'next/router'; // https://nextjs.org/docs/api-reference/next/router import { useRouter } from "next/router"; // https://nextjs.org/docs/api-reference/next/router
import { useState } from 'react'; import { useState } from "react";
import { DashboardCreator } from '../web/display/dashboardCreator'; import { DashboardCreator } from "../web/display/dashboardCreator";
import displayForecasts from '../web/display/displayForecasts'; import displayForecasts from "../web/display/displayForecasts";
import Layout from '../web/display/layout'; import Layout from "../web/display/layout";
import { getDashboardForecastsByDashboardId } from '../web/worker/getDashboardForecasts'; import { getDashboardForecastsByDashboardId } from "../web/worker/getDashboardForecasts";
/* get Props */ /* get Props */

View File

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

View File

@ -1,4 +1,4 @@
import React, { useEffect } from 'react'; import React, { useEffect } from "react";
function Recursion() { function Recursion() {
useEffect(() => { useEffect(() => {

View File

@ -1,11 +1,11 @@
/* Imports */ /* Imports */
// React // React
import { useRouter } from 'next/router'; // https://nextjs.org/docs/api-reference/next/router import { useRouter } from "next/router"; // https://nextjs.org/docs/api-reference/next/router
import { useState } from 'react'; import { useState } from "react";
import displayForecasts from '../web/display/displayForecasts'; import displayForecasts from "../web/display/displayForecasts";
import { getDashboardForecastsByDashboardId } from '../web/worker/getDashboardForecasts'; import { getDashboardForecastsByDashboardId } from "../web/worker/getDashboardForecasts";
/* get Props */ /* get Props */

View File

@ -1,10 +1,10 @@
/* Imports */ /* Imports */
import React from 'react'; import React from "react";
import { displayForecast } from '../web/display/displayForecasts'; import { displayForecast } from "../web/display/displayForecasts";
import { platformsWithLabels } from '../web/platforms'; import { platformsWithLabels } from "../web/platforms";
import searchAccordingToQueryData from '../web/worker/searchAccordingToQueryData'; import searchAccordingToQueryData from "../web/worker/searchAccordingToQueryData";
/* Helper functions */ /* Helper functions */

View File

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

View File

@ -1,4 +1,4 @@
import React from 'react'; import React from "react";
interface Props { interface Props {
onChange: (x: number) => void; onChange: (x: number) => void;

View File

@ -1,4 +1,4 @@
import React, { useState } from 'react'; import React, { useState } from "react";
let exampleInput = `{ let exampleInput = `{
"title": "Random example", "title": "Random example",

View File

@ -1,7 +1,7 @@
/* Imports */ /* Imports */
import React from 'react'; import React from "react";
import { FaRegClipboard } from 'react-icons/fa'; import { FaRegClipboard } from "react-icons/fa";
import ReactMarkdown from 'react-markdown'; import ReactMarkdown from "react-markdown";
/* Definitions */ /* Definitions */

View File

@ -1,5 +1,5 @@
import displayForecasts from './displayForecasts'; import displayForecasts from "./displayForecasts";
import displayOneForecast from './displayOneForecastForCapture'; import displayOneForecast from "./displayOneForecastForCapture";
export function displayForecastsWrapperForSearch({ export function displayForecastsWrapperForSearch({
results, results,

View File

@ -1,9 +1,9 @@
import domtoimage from 'dom-to-image'; // https://github.com/tsayen/dom-to-image import domtoimage from "dom-to-image"; // https://github.com/tsayen/dom-to-image
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from "react";
import { CopyToClipboard } from 'react-copy-to-clipboard'; import { CopyToClipboard } from "react-copy-to-clipboard";
import { uploadToImgur } from '../worker/uploadToImgur'; import { uploadToImgur } from "../worker/uploadToImgur";
import { displayForecast } from './displayForecasts'; import { displayForecast } from "./displayForecasts";
function displayOneForecastInner(result, containerRef) { function displayOneForecastInner(result, containerRef) {
return ( return (

View File

@ -1,4 +1,4 @@
import React from 'react'; import React from "react";
export default function Form({ value, onChange, placeholder }) { export default function Form({ value, onChange, placeholder }) {
const handleInputChange = (event) => { const handleInputChange = (event) => {

View File

@ -1,8 +1,8 @@
import Head from 'next/head'; import Head from "next/head";
import Link from 'next/link'; import Link from "next/link";
import React, { ErrorInfo } from 'react'; import React, { ErrorInfo } from "react";
import { Logo2 } from '../icons/index'; import { Logo2 } from "../icons/index";
/* Utilities */ /* Utilities */
const classNameSelected = (isSelected: boolean) => const classNameSelected = (isSelected: boolean) =>

View File

@ -1,8 +1,8 @@
import chroma from 'chroma-js'; import chroma from "chroma-js";
import React from 'react'; import React from "react";
import Select from 'react-select'; import Select from "react-select";
import { platformsWithLabels } from '../platforms'; import { platformsWithLabels } from "../platforms";
const colourStyles = { const colourStyles = {
control: (styles) => ({ ...styles, backgroundColor: "white" }), control: (styles) => ({ ...styles, backgroundColor: "white" }),

View File

@ -1,6 +1,6 @@
/* Imports */ /* Imports */
import React from 'react'; import React from "react";
import { Handles, Rail, Slider, Tracks } from 'react-compound-slider'; import { Handles, Rail, Slider, Tracks } from "react-compound-slider";
// https://sghall.github.io/react-compound-slider/#/getting-started/tutorial // https://sghall.github.io/react-compound-slider/#/getting-started/tutorial

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import * as React from "react";
function SvgFavicon(props) { function SvgFavicon(props) {
return ( return (

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import * as React from "react";
function SvgLogo(props) { function SvgLogo(props) {
return ( return (

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import * as React from "react";
function SvgLogo2(props) { function SvgLogo2(props) {
return ( return (

View File

@ -1,12 +1,18 @@
import { useRouter } from 'next/router'; import { useRouter } from "next/router";
import React, { DependencyList, EffectCallback, Fragment, useEffect, useState } from 'react'; import React, {
DependencyList,
EffectCallback,
Fragment,
useEffect,
useState,
} from "react";
import ButtonsForStars from '../display/buttonsForStars'; import ButtonsForStars from "../display/buttonsForStars";
import Form from '../display/form'; import Form from "../display/form";
import MultiSelectPlatform from '../display/multiSelectPlatforms'; import MultiSelectPlatform from "../display/multiSelectPlatforms";
import { SliderElement } from '../display/slider'; import { SliderElement } from "../display/slider";
import { platformsWithLabels, PlatformWithLabel } from '../platforms'; import { platformsWithLabels, PlatformWithLabel } from "../platforms";
import searchAccordingToQueryData from '../worker/searchAccordingToQueryData'; import searchAccordingToQueryData from "../worker/searchAccordingToQueryData";
interface QueryParametersWithoutNum { interface QueryParametersWithoutNum {
query: string; query: string;

View File

@ -1,8 +1,12 @@
import { GetServerSideProps } from 'next'; import { GetServerSideProps } from "next";
import { getFrontpage } from '../../backend/frontpage'; import { getFrontpage } from "../../backend/frontpage";
import searchAccordingToQueryData from '../worker/searchAccordingToQueryData'; import searchAccordingToQueryData from "../worker/searchAccordingToQueryData";
import { defaultNumDisplay, defaultQueryParameters, QueryParameters } from './CommonDisplay'; import {
defaultNumDisplay,
defaultQueryParameters,
QueryParameters,
} from "./CommonDisplay";
/* Common code for / and /capture */ /* Common code for / and /capture */

View File

@ -1,4 +1,4 @@
import axios from 'axios'; import axios from "axios";
export async function getDashboardForecastsByDashboardId({ dashboardId }) { export async function getDashboardForecastsByDashboardId({ dashboardId }) {
console.log("getDashboardForecastsByDashboardId: "); console.log("getDashboardForecastsByDashboardId: ");

View File

@ -1,5 +1,5 @@
import searchGuesstimate from './searchGuesstimate'; import searchGuesstimate from "./searchGuesstimate";
import searchWithAlgolia from './searchWithAlgolia'; import searchWithAlgolia from "./searchWithAlgolia";
export default async function searchAccordingToQueryData(queryData) { export default async function searchAccordingToQueryData(queryData) {
let results = []; let results = [];

View File

@ -1,5 +1,5 @@
/* Imports */ /* Imports */
import axios from 'axios'; import axios from "axios";
/* Definitions */ /* Definitions */
let urlEndPoint = let urlEndPoint =

View File

@ -1,4 +1,4 @@
import algoliasearch from 'algoliasearch'; import algoliasearch from "algoliasearch";
const client = algoliasearch("96UD3NTQ7L", "618dbd0092971388cfd43aac1ae5f1f5"); // Only search. const client = algoliasearch("96UD3NTQ7L", "618dbd0092971388cfd43aac1ae5f1f5"); // Only search.
const index = client.initIndex("metaforecast"); const index = client.initIndex("metaforecast");

View File

@ -1,5 +1,5 @@
// import fetch from "fetch" // import fetch from "fetch"
import axios, { AxiosRequestConfig } from 'axios'; import axios, { AxiosRequestConfig } from "axios";
export async function uploadToImgur(dataURL, handleGettingImgurlImage) { export async function uploadToImgur(dataURL, handleGettingImgurlImage) {
let request: AxiosRequestConfig = { let request: AxiosRequestConfig = {