From 41e55aceaa755281da21d45faf31ff06ecb55b4f Mon Sep 17 00:00:00 2001 From: Jude Allred Date: Tue, 21 Nov 2023 15:58:06 -0500 Subject: [PATCH] yarn fmt --- .../components/ErrorBoundary/ErrorBoundary.tsx | 5 ----- .../src/features/simulator/simulate/slice.ts | 3 --- .../core/src/util/api/queries/basicUser.ts | 1 - .../src/util/api/queries/bootstrapQuery.ts | 3 --- .../packages/core/src/util/api/query.ts | 18 +----------------- apps/sim-core/packages/core/vite.config.ts | 2 +- 6 files changed, 2 insertions(+), 30 deletions(-) diff --git a/apps/sim-core/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx b/apps/sim-core/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx index 229bab9..bb8e828 100644 --- a/apps/sim-core/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx +++ b/apps/sim-core/packages/core/src/components/ErrorBoundary/ErrorBoundary.tsx @@ -1,7 +1,6 @@ import React, { Component, createContext, - ErrorInfo, FC, useContext, useMemo, @@ -130,10 +129,6 @@ export class ErrorBoundary extends Component< hashEventId: null, }; - componentDidCatch(error: Error, errorInfo: ErrorInfo) { - const { hashEventId } = this.state; - } - render() { const { didError, diff --git a/apps/sim-core/packages/core/src/features/simulator/simulate/slice.ts b/apps/sim-core/packages/core/src/features/simulator/simulate/slice.ts index d48651f..d98da26 100644 --- a/apps/sim-core/packages/core/src/features/simulator/simulate/slice.ts +++ b/apps/sim-core/packages/core/src/features/simulator/simulate/slice.ts @@ -2,7 +2,6 @@ import { AnyAction, createAction, createSlice, - current, Draft, EntityId, freeze, @@ -491,8 +490,6 @@ const { reducer, actions } = createSlice({ ? null : action.payload.simId; - const currentState = current(state); - state.currentSimulation = simId; state.analysisMode = simId ? AnalysisMode.SingleRun : null; state.history.selectedCommitGroup = null; diff --git a/apps/sim-core/packages/core/src/util/api/queries/basicUser.ts b/apps/sim-core/packages/core/src/util/api/queries/basicUser.ts index 8ff5511..192522d 100644 --- a/apps/sim-core/packages/core/src/util/api/queries/basicUser.ts +++ b/apps/sim-core/packages/core/src/util/api/queries/basicUser.ts @@ -1,5 +1,4 @@ import { BasicUser } from "../types"; -import { IS_DEV, IS_LOCAL } from "../paths"; import { query } from "../query"; export const BasicUserFragment = /* GraphQL */ ` diff --git a/apps/sim-core/packages/core/src/util/api/queries/bootstrapQuery.ts b/apps/sim-core/packages/core/src/util/api/queries/bootstrapQuery.ts index 2a8761b..c1c4846 100644 --- a/apps/sim-core/packages/core/src/util/api/queries/bootstrapQuery.ts +++ b/apps/sim-core/packages/core/src/util/api/queries/bootstrapQuery.ts @@ -47,8 +47,6 @@ import { setLocalStorageProject } from "../../../features/middleware/localStorag // `; export const bootstrapQuery = async () => { - let me: User | undefined; - try { // const result = await query(queryString); // Migration shim @@ -62,7 +60,6 @@ export const bootstrapQuery = async () => { email: string; role: Pick; }; - me = user; return { ...bootstrap, diff --git a/apps/sim-core/packages/core/src/util/api/query.ts b/apps/sim-core/packages/core/src/util/api/query.ts index def9324..0d908dd 100644 --- a/apps/sim-core/packages/core/src/util/api/query.ts +++ b/apps/sim-core/packages/core/src/util/api/query.ts @@ -1,5 +1,3 @@ -import prettyStringify from "json-stringify-pretty-compact"; - import { API_URL } from "./paths"; const parseQueryForName = (graphql: string) => @@ -92,21 +90,7 @@ export async function query( variables?: V, signal?: AbortSignal ): Promise { - const { data, errors, queryName } = await baseQuery( - graphql, - variables, - signal - ); - - const crumb = { - type: "query", - data: { - graphql, - variables: variables ? prettyStringify(variables) : "{}", - ...(errors ? { errors: prettyStringify(errors) } : {}), - }, - category: "graphql", - }; + const { data, errors } = await baseQuery(graphql, variables, signal); if (errors) { throw new QueryError({ diff --git a/apps/sim-core/packages/core/vite.config.ts b/apps/sim-core/packages/core/vite.config.ts index bb09b41..98dc744 100644 --- a/apps/sim-core/packages/core/vite.config.ts +++ b/apps/sim-core/packages/core/vite.config.ts @@ -32,7 +32,7 @@ export default defineConfig(({ mode }) => { }, reportCompressedSize: false, minify: true, - sourcemap: false + sourcemap: false, }, define: { BUILD_STAMP: JSON.stringify(BUILD_STAMP),