From 3a5640cb7003d0cc72854648175b4f354b8a0cca Mon Sep 17 00:00:00 2001 From: Aritra Chatterjee Date: Thu, 7 Mar 2024 19:05:17 +0530 Subject: [PATCH] add back prettier, some other format changes --- packages/webapp/package.json | 1 + packages/webapp/src/actions/joinGame.ts | 2 +- packages/webapp/src/components/collection/deckPanel.tsx | 2 +- packages/webapp/src/components/modals/gameEndedModal.tsx | 2 +- packages/webapp/src/components/modals/loadingModal.tsx | 2 +- packages/webapp/src/components/navbar.tsx | 2 +- packages/webapp/src/pages/collection.tsx | 4 ++-- packages/webapp/src/utils/zkproofs/proofWorker.ts | 2 +- packages/webapp/wagmi.config.ts | 2 +- pnpm-lock.yaml | 4 +++- 10 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/webapp/package.json b/packages/webapp/package.json index 3f348273..a56c5857 100644 --- a/packages/webapp/package.json +++ b/packages/webapp/package.json @@ -26,6 +26,7 @@ "next": "^13.5.6", "next-themes": "^0.2.1", "next-transpile-modules": "^10.0.1", + "prettier": "^3.2.5", "react": "18.2.0", "react-dom": "18.2.0", "react-icons": "^4.11.0", diff --git a/packages/webapp/src/actions/joinGame.ts b/packages/webapp/src/actions/joinGame.ts index 72af0b54..66b4a152 100644 --- a/packages/webapp/src/actions/joinGame.ts +++ b/packages/webapp/src/actions/joinGame.ts @@ -30,7 +30,7 @@ import { import { FetchedGameData, GameStatus, PlayerData, PrivateInfo } from "src/store/types" import { waitForUpdate } from "src/store/update" import { getOrInitPrivateInfo, setGameID, setPrivateInfo } from "src/store/write" -import { FAKE_PROOF, ProofOutput, proveInWorker,SHOULD_GENERATE_PROOFS } from "src/utils/zkproofs" +import { FAKE_PROOF, ProofOutput, proveInWorker, SHOULD_GENERATE_PROOFS } from "src/utils/zkproofs" import { decodeEventLog } from "viem" // ================================================================================================= diff --git a/packages/webapp/src/components/collection/deckPanel.tsx b/packages/webapp/src/components/collection/deckPanel.tsx index c7bc2e32..20ced2c4 100644 --- a/packages/webapp/src/components/collection/deckPanel.tsx +++ b/packages/webapp/src/components/collection/deckPanel.tsx @@ -2,7 +2,7 @@ import React, { useState } from "react" import Image from "next/image" import { Button } from "src/components/ui/button" -import { Card,Deck } from "src/store/types" +import { Card, Deck } from "src/store/types" import { testCards } from "src/utils/card-list" interface DeckConstructionPanelProps { diff --git a/packages/webapp/src/components/modals/gameEndedModal.tsx b/packages/webapp/src/components/modals/gameEndedModal.tsx index ddacc728..75f2a549 100644 --- a/packages/webapp/src/components/modals/gameEndedModal.tsx +++ b/packages/webapp/src/components/modals/gameEndedModal.tsx @@ -2,7 +2,7 @@ import { useCallback, useState } from "react" import { useRouter } from "next/router" import { Button } from "src/components/ui/button" -import { Dialog, DialogContent,DialogDescription, DialogTitle } from "src/components/ui/dialog" +import { Dialog, DialogContent, DialogDescription, DialogTitle } from "src/components/ui/dialog" import { useGameData, useGameID } from "src/store/hooks" import { navigate } from "src/utils/navigate" diff --git a/packages/webapp/src/components/modals/loadingModal.tsx b/packages/webapp/src/components/modals/loadingModal.tsx index 24cbaa5b..46a4552b 100644 --- a/packages/webapp/src/components/modals/loadingModal.tsx +++ b/packages/webapp/src/components/modals/loadingModal.tsx @@ -2,7 +2,7 @@ import { ReactNode, useCallback } from "react" import { Spinner } from "src/components/lib/modalElements" import { Button } from "src/components/ui/button" -import { Dialog, DialogContent,DialogDescription, DialogTitle } from "src/components/ui/dialog" +import { Dialog, DialogContent, DialogDescription, DialogTitle } from "src/components/ui/dialog" // ================================================================================================= diff --git a/packages/webapp/src/components/navbar.tsx b/packages/webapp/src/components/navbar.tsx index 89f81527..b6846d10 100644 --- a/packages/webapp/src/components/navbar.tsx +++ b/packages/webapp/src/components/navbar.tsx @@ -1,7 +1,7 @@ import Link from "next/link" import { ConnectKitButton } from "connectkit" -import { NavigationMenu, NavigationMenuItem,NavigationMenuList } from "src/components/ui/navigation-menu" +import { NavigationMenu, NavigationMenuItem, NavigationMenuList } from "src/components/ui/navigation-menu" import { Button } from "./ui/button" diff --git a/packages/webapp/src/pages/collection.tsx b/packages/webapp/src/pages/collection.tsx index 4eede447..c5fed803 100644 --- a/packages/webapp/src/pages/collection.tsx +++ b/packages/webapp/src/pages/collection.tsx @@ -1,4 +1,4 @@ -import React, { useEffect,useMemo, useState } from "react" +import React, { useEffect, useMemo, useState } from "react" import Head from "next/head" import { useRouter } from "next/router" @@ -13,7 +13,7 @@ import { Navbar } from "src/components/navbar" import { deployment } from "src/deployment" import { useInventoryCardsCollectionGetCollection } from "src/generated" import { FablePage } from "src/pages/_app" -import { Card,Deck } from "src/store/types" +import { Card, Deck } from "src/store/types" import { navigate } from "utils/navigate" import { useAccount } from "wagmi" diff --git a/packages/webapp/src/utils/zkproofs/proofWorker.ts b/packages/webapp/src/utils/zkproofs/proofWorker.ts index 1d7c42ea..78fa912c 100644 --- a/packages/webapp/src/utils/zkproofs/proofWorker.ts +++ b/packages/webapp/src/utils/zkproofs/proofWorker.ts @@ -4,7 +4,7 @@ * Used from {@link proveInWorker}. */ -import { type ProofInputs,prove } from "src/utils/zkproofs/proofs" +import { type ProofInputs, prove } from "src/utils/zkproofs/proofs" // ================================================================================================= diff --git a/packages/webapp/wagmi.config.ts b/packages/webapp/wagmi.config.ts index efbfea49..ac586ee6 100644 --- a/packages/webapp/wagmi.config.ts +++ b/packages/webapp/wagmi.config.ts @@ -1,5 +1,5 @@ import { defineConfig } from "@wagmi/cli" -import { foundry,react } from "@wagmi/cli/plugins" +import { foundry, react } from "@wagmi/cli/plugins" export default defineConfig({ out: "src/generated.ts", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 94483294..d9e96e65 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -117,6 +117,9 @@ importers: next-transpile-modules: specifier: ^10.0.1 version: 10.0.1 + prettier: + specifier: ^3.2.5 + version: 3.2.5 react: specifier: 18.2.0 version: 18.2.0 @@ -11383,7 +11386,6 @@ packages: resolution: {integrity: sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==} engines: {node: '>=14'} hasBin: true - dev: true /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==}