Skip to content

Commit

Permalink
Removing query-string from react example
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Apr 22, 2024
1 parent 9c925c7 commit 757b9b8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 37 deletions.
1 change: 0 additions & 1 deletion examples/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"@vanilla-extract/css": "^1.9.3",
"ethers": "^5.7.2",
"framer-motion": "^8.5.2",
"query-string": "^8.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"typescript": "^5.3.3",
Expand Down
10 changes: 4 additions & 6 deletions examples/react/src/components/Homepage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useEffect } from 'react'
import qs from 'query-string'
import {
useOpenConnectModal,
signEthAuthProof,
Expand Down Expand Up @@ -32,7 +31,6 @@ import {
MoonIcon,
SignoutIcon,
useTheme,
vars,
Spinner,
useMediaQuery,
Switch,
Expand All @@ -48,6 +46,10 @@ import abi from '../constants/nft-abi'
import { ethers } from 'ethers'
import { Alert, AlertProps } from './Alert'

// append ?debug to url to enable debug mode
const searchParams = new URLSearchParams(location.search)
const isDebugMode = searchParams.has('debug')

function Homepage() {
const { theme, setTheme } = useTheme()
const { setTheme: setKitTheme } = useKitTheme()
Expand Down Expand Up @@ -140,10 +142,6 @@ function Homepage() {

const publicClient = usePublicClient({ chainId })

// append ?debug=true to url to enable debug mode
const { debug } = qs.parse(location.search)
const isDebugMode = debug === 'true'

const generateEthAuthProof = async () => {
if (!walletClient || !publicClient) {
return
Expand Down
7 changes: 4 additions & 3 deletions examples/react/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ dns.setDefaultResultOrder('verbatim')

export default defineConfig(() => {
return {
// build: {
// outDir: 'build',
// },
plugins: [
react(),
nodePolyfills({
Expand All @@ -25,7 +22,11 @@ export default defineConfig(() => {
vanillaExtractPlugin(),
svgrPlugin()
],
build: {
minify: false
},
server: {
minify: false,
port: 4444,
fs: {
// Allow serving files from one level up to the project root
Expand Down
27 changes: 0 additions & 27 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 757b9b8

Please sign in to comment.