fix: update dependencies to latest

This commit is contained in:
Divlo
2023-01-11 17:39:09 +01:00
parent b5089f7f0b
commit cd1a477324
31 changed files with 1243 additions and 17860 deletions

View File

@ -35,7 +35,11 @@ export const CreateGuild: React.FC = () => {
AxiosResponse<{ guild: GuildComplete }>
>('/guilds', { name: formData.name, description: formData.description })
const guildId = data.guild.id
const channelId = data.guild.channels[0].id
const channel = data.guild.channels[0]
if (channel == null) {
throw new Error('No channel found')
}
const channelId = channel.id
await router.push(`/application/${guildId}/${channelId}`)
return null
} catch (error) {

View File

@ -82,7 +82,7 @@ export const GuildSettings: React.FC = () => {
) => {
setFetchState('loading')
const files = event?.target?.files
if (files != null && files.length === 1) {
if (files != null && files.length === 1 && files[0] != null) {
const file = files[0]
const formData = new FormData()
formData.append('icon', file)

View File

@ -54,7 +54,7 @@ export const SendMessage: React.FC<SendMessageProps> = (props) => {
event
) => {
const files = event?.target?.files
if (files != null && files.length === 1) {
if (files != null && files.length === 1 && files[0] != null) {
const file = files[0]
const formData = new FormData()
formData.append('file', file)

View File

@ -149,7 +149,7 @@ export const UserSettings: React.FC = () => {
) => {
setFetchState('loading')
const files = event?.target?.files
if (files != null && files.length === 1) {
if (files != null && files.length === 1 && files[0] != null) {
const file = files[0]
const formData = new FormData()
formData.append('logo', file)

View File

@ -16,9 +16,9 @@ export const Loader: React.FC<LoaderProps> = (props) => {
className='relative my-0 mx-auto before:block before:pt-[100%] before:content-none'
style={{ width: `${width}px`, height: `${height}px` }}
>
<svg className={styles.progressSpinnerSvg} viewBox='25 25 50 50'>
<svg className={styles['progressSpinnerSvg']} viewBox='25 25 50 50'>
<circle
className={styles.progressSpinnerCircle}
className={styles['progressSpinnerCircle']}
cx='50'
cy='50'
r='20'

View File

@ -58,10 +58,10 @@ export const SocialMediaButton: React.FC<SocialMediaButtonProps> = (props) => {
style={{ background: socialMediaColor }}
className={classNames(
className,
styles.button,
styles['button'],
{
[styles.buttonGoogle]: socialMedia === 'Google',
[styles.buttonMedia]: socialMedia !== 'Google'
[styles['buttonGoogle'] as string]: socialMedia === 'Google',
[styles['buttonMedia'] as string]: socialMedia !== 'Google'
},
givenClassName
)}
@ -88,10 +88,10 @@ export const SocialMediaLink: React.FC<SocialMediaLinkProps> = (props) => {
style={{ background: socialMediaColor }}
className={classNames(
className,
styles.button,
styles['button'],
{
[styles.buttonGoogle]: socialMedia === 'Google',
[styles.buttonMedia]: socialMedia !== 'Google'
[styles['buttonGoogle'] as string]: socialMedia === 'Google',
[styles['buttonMedia'] as string]: socialMedia !== 'Google'
},
givenClassName
)}