Upgrade prettier and re-format codebase
This commit is contained in:
@@ -29,7 +29,7 @@ export default function ChainItem({ chain, hoverCardElementBoundary }: ChainItem
|
||||
}
|
||||
}
|
||||
className={cn(
|
||||
"group relative inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white focus:outline-none focus:ring-4 focus:ring-red-100 aria-selected:text-gray-900",
|
||||
"group relative inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white focus:outline-none focus:ring-4 focus:ring-red-100 aria-selected:text-gray-900",
|
||||
connectedChain.registryName === chain.registryName
|
||||
? "cursor-not-allowed border-green-600 bg-green-300 text-green-900 aria-selected:bg-green-300"
|
||||
: "transparent cursor-pointer border-white",
|
||||
@@ -62,7 +62,7 @@ export default function ChainItem({ chain, hoverCardElementBoundary }: ChainItem
|
||||
</CommandItem>
|
||||
</HoverCardTrigger>
|
||||
<HoverCardContent
|
||||
className="w-auto bg-fuchsia-900"
|
||||
className="w-auto bg-fuchsia-900"
|
||||
collisionBoundary={hoverCardElementBoundary}
|
||||
>
|
||||
<ChainDigest chain={chain} />
|
||||
|
||||
@@ -266,7 +266,9 @@ export default function CustomChainForm() {
|
||||
<JsonEditor
|
||||
content={{ text: field.value }}
|
||||
onChange={(newMsgContent) => {
|
||||
field.onChange("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
|
||||
field.onChange(
|
||||
"text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}",
|
||||
);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -30,12 +30,12 @@ export default function DialogButton() {
|
||||
|
||||
return showChainSelect ? (
|
||||
<DialogTrigger>
|
||||
<div className="group relative m-1 inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white hover:bg-white hover:text-gray-900 focus:outline-none focus:ring-4 focus:ring-red-100">
|
||||
<div className="group relative m-1 inline-flex cursor-pointer items-center justify-center gap-2 rounded-full border-2 border-white p-2.5 text-sm font-medium text-white hover:bg-white hover:text-gray-900 focus:outline-none focus:ring-4 focus:ring-red-100">
|
||||
<ChainHeader />
|
||||
</div>
|
||||
</DialogTrigger>
|
||||
) : (
|
||||
<div className="group relative m-1 inline-flex items-center justify-center gap-2 p-2.5 text-sm font-medium text-white">
|
||||
<div className="group relative m-1 inline-flex items-center justify-center gap-2 p-2.5 text-sm font-medium text-white">
|
||||
<ChainHeader />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -57,7 +57,7 @@ export default function AccountView() {
|
||||
copy(walletInfo.address);
|
||||
toast(`Copied address to clipboard`, { description: walletInfo.address });
|
||||
}}
|
||||
className=" flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
|
||||
className="flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
|
||||
>
|
||||
<Copy className="w-5" />
|
||||
<div className="flex-1 space-y-1">
|
||||
@@ -70,7 +70,7 @@ export default function AccountView() {
|
||||
copy(walletInfo.pubKey);
|
||||
toast(`Copied public key to clipboard`, { description: walletInfo.pubKey });
|
||||
}}
|
||||
className=" flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
|
||||
className="flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
|
||||
>
|
||||
<Copy className="w-5" />
|
||||
<div className="flex-1 space-y-1">
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function MultisigView() {
|
||||
copy(multisigAddress);
|
||||
toast(`Copied address to clipboard`, { description: multisigAddress });
|
||||
}}
|
||||
className=" flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
|
||||
className="flex items-center space-x-4 rounded-md border p-4 transition-colors hover:cursor-pointer hover:bg-muted/50"
|
||||
>
|
||||
<Copy className="w-5" />
|
||||
<div className="flex-1 space-y-1">
|
||||
|
||||
@@ -174,7 +174,7 @@ const MsgExecuteContractForm = ({
|
||||
label="Msg JSON"
|
||||
content={{ text: msgContent }}
|
||||
onChange={(newMsgContent, _, { contentErrors }) => {
|
||||
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
|
||||
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
|
||||
jsonError.current = !!contentErrors;
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -252,7 +252,7 @@ const MsgInstantiateContract2Form = ({
|
||||
label="Msg JSON"
|
||||
content={{ text: msgContent }}
|
||||
onChange={(newMsgContent, _, { contentErrors }) => {
|
||||
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
|
||||
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
|
||||
jsonError.current = !!contentErrors;
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -215,7 +215,7 @@ const MsgInstantiateContractForm = ({
|
||||
label="Msg JSON"
|
||||
content={{ text: msgContent }}
|
||||
onChange={(newMsgContent, _, { contentErrors }) => {
|
||||
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
|
||||
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
|
||||
jsonError.current = !!contentErrors;
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -120,7 +120,7 @@ const MsgMigrateContractForm = ({
|
||||
label="Msg JSON"
|
||||
content={{ text: msgContent }}
|
||||
onChange={(newMsgContent, _, { contentErrors }) => {
|
||||
setMsgContent("text" in newMsgContent ? newMsgContent.text ?? "{}" : "{}");
|
||||
setMsgContent("text" in newMsgContent ? (newMsgContent.text ?? "{}") : "{}");
|
||||
jsonError.current = !!contentErrors;
|
||||
}}
|
||||
/>
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ export const requestJson = async (
|
||||
{ method, headers, body, ...restConfig }: RequestConfig = {},
|
||||
) => {
|
||||
const config: RequestInit = {
|
||||
method: method ?? body ? "POST" : "GET",
|
||||
method: (method ?? body) ? "POST" : "GET",
|
||||
headers: body ? { "Content-Type": "application/json", ...headers } : headers,
|
||||
body: body ? JSON.stringify(body) : null,
|
||||
...restConfig,
|
||||
|
||||
Generated
+5
-4
@@ -72,7 +72,7 @@
|
||||
"next": "14.2.4",
|
||||
"next-themes": "^0.3.0",
|
||||
"postcss": "8.4.38",
|
||||
"prettier": "^3.3.2",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"react": "18.3.1",
|
||||
"react-day-picker": "^8.10.1",
|
||||
@@ -9746,9 +9746,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz",
|
||||
"integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==",
|
||||
"version": "3.4.2",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz",
|
||||
"integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==",
|
||||
"license": "MIT",
|
||||
"bin": {
|
||||
"prettier": "bin/prettier.cjs"
|
||||
},
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@
|
||||
"test:ci": "jest",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"format": "prettier --write --log-level warn \"./**/*.{js,jsx,ts,tsx}\"",
|
||||
"format": "prettier --write --log-level warn \"./**/*.{js,jsx,mjs,ts,tsx}\"",
|
||||
"lint": "eslint --max-warnings 0 \"./**/*.{js,jsx,ts,tsx}\"",
|
||||
"lint:fix": "eslint --max-warnings 0 \"./**/*.{js,jsx,ts,tsx}\" --fix"
|
||||
},
|
||||
@@ -77,7 +77,7 @@
|
||||
"next": "14.2.4",
|
||||
"next-themes": "^0.3.0",
|
||||
"postcss": "8.4.38",
|
||||
"prettier": "^3.3.2",
|
||||
"prettier": "^3.4.2",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"react": "18.3.1",
|
||||
"react-day-picker": "^8.10.1",
|
||||
|
||||
Reference in New Issue
Block a user