Merge pull request #54 from public-awesome/wider-error-messages

Remove maxWidth for error messages
This commit is contained in:
Serkan Reis
2022-11-02 10:56:24 +03:00
committed by GitHub
16 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export const AirdropUpload = ({ onChange }: AirdropUploadProps) => {
}
return onChange(accountsData)
} catch (error: any) {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
}
}
reader.readAsText(event.target.files[0])
@@ -78,7 +78,7 @@ export const CollectionDetails = ({ onChange, uploadMethod, coverImageUrl }: Col
onChange(data)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
@@ -183,7 +183,7 @@ export const UploadDetails = ({ onChange }: UploadDetailsProps) => {
}
onChange(data)
} catch (error: any) {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
}
}, [
assetFilesArray,
+1 -1
View File
@@ -61,7 +61,7 @@ export const CollectionQueries = ({
{
placeholderData: null,
onError: (error: any) => {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
},
enabled: Boolean(sg721ContractAddress && minterContractAddress && type),
retry: false,
+2 -2
View File
@@ -83,7 +83,7 @@ export const useWalletStore = create(
init(signer)
if (walletChange) set({ initializing: false })
} catch (err: any) {
toast.error(err?.message)
toast.error(err?.message, { style: { maxWidth: 'none' } })
set({ initializing: false })
}
},
@@ -113,7 +113,7 @@ export const useWalletStore = create(
const client = (await createQueryClient()) as SigningCosmWasmClient
set({ client })
} catch (err: any) {
toast.error(err?.message)
toast.error(err?.message, { style: { maxWidth: 'none' } })
set({ initializing: false })
}
},
+3 -3
View File
@@ -88,11 +88,11 @@ const CollectionCreationPage: NextPage = () => {
setReadyToCreate(true)
})
.catch((err) => {
toast.error(`Error in Whitelist Configuration: ${err.message}`)
toast.error(`Error in Whitelist Configuration: ${err.message}`, { style: { maxWidth: 'none' } })
setReadyToCreate(false)
})
} catch (error: any) {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
setUploading(false)
}
}
@@ -145,7 +145,7 @@ const CollectionCreationPage: NextPage = () => {
setCreatingCollection(false)
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
setCreatingCollection(false)
setUploading(false)
}
+1 -1
View File
@@ -79,7 +79,7 @@ const CollectionQueriesPage: NextPage = () => {
{
placeholderData: null,
onError: (error: any) => {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
},
enabled: Boolean(sg721ContractAddress && minterContractAddress && type),
retry: false,
+1 -1
View File
@@ -119,7 +119,7 @@ const MinterExecutePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)
+1 -1
View File
@@ -216,7 +216,7 @@ const MinterInstantiatePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)
+1 -1
View File
@@ -57,7 +57,7 @@ const MinterQueryPage: NextPage = () => {
{
placeholderData: null,
onError: (error: any) => {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
},
enabled: Boolean(contractAddress && contract && wallet),
},
+1 -1
View File
@@ -119,7 +119,7 @@ const Sg721ExecutePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)
+1 -1
View File
@@ -69,7 +69,7 @@ const Sg721QueryPage: NextPage = () => {
{
placeholderData: null,
onError: (error: any) => {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
},
enabled: Boolean(contractAddress && contract && wallet),
},
+1 -1
View File
@@ -90,7 +90,7 @@ const WhitelistExecutePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)
+1 -1
View File
@@ -91,7 +91,7 @@ const Sg721InstantiatePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)
+1 -1
View File
@@ -59,7 +59,7 @@ const WhitelistQueryPage: NextPage = () => {
{
placeholderData: null,
onError: (error: any) => {
toast.error(error.message)
toast.error(error.message, { style: { maxWidth: 'none' } })
},
enabled: Boolean(contractAddress && contract && wallet),
},
+1 -1
View File
@@ -6,6 +6,6 @@ export async function copy(text: string, message: Renderable = 'Copied to clipbo
await navigator.clipboard.writeText(text)
return toast.success(message)
} catch (err: unknown) {
return toast.error(String(err))
return toast.error(String(err), { style: { maxWidth: 'none' } })
}
}