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)