Skip to content

Commit

Permalink
fix: make session optional so that area pages w/o photos won't trigge…
Browse files Browse the repository at this point in the history
…r a login (#905)
  • Loading branch information
vnugent authored Jul 10, 2023
1 parent 2d899d8 commit 68efdd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/hooks/usePhotoUploader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function usePhotoUploader (): PhotoUploaderReturnType {

const setUploading = useUserGalleryStore(store => store.setUploading)
const isUploading = useUserGalleryStore(store => store.uploading)
const { data: sessionData } = useSession({ required: true })
const { data: sessionData } = useSession()
const { addMediaObjectsCmd } = useMediaCmd()

/** When a file is loaded by the browser (as in, loaded from the local filesystem,
Expand Down Expand Up @@ -76,7 +76,7 @@ export default function usePhotoUploader (): PhotoUploaderReturnType {
}
} catch (e) {
toast.error('Uploading error. Please try again.')
console.error('Meida upload error.', e)
console.error('Media upload error.', e)
}
}

Expand Down

1 comment on commit 68efdd9

@vercel
Copy link

@vercel vercel bot commented on 68efdd9 Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.