Remove maxWidth for error messages

This commit is contained in:
Serkan Reis 2022-11-02 10:53:17 +03:00
parent 9eb2fdf302
commit fdec20798e
16 changed files with 19 additions and 19 deletions

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])

View File

@ -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
}, [

View File

@ -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,

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,

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 })
}
},

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)
}

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,

View File

@ -119,7 +119,7 @@ const MinterExecutePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)

View File

@ -216,7 +216,7 @@ const MinterInstantiatePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)

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),
},

View File

@ -119,7 +119,7 @@ const Sg721ExecutePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)

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),
},

View File

@ -90,7 +90,7 @@ const WhitelistExecutePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)

View File

@ -91,7 +91,7 @@ const Sg721InstantiatePage: NextPage = () => {
},
{
onError: (error) => {
toast.error(String(error))
toast.error(String(error), { style: { maxWidth: 'none' } })
},
},
)

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),
},

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' } })
}
}