-
Notifications
You must be signed in to change notification settings - Fork 483
feat: storage api #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: storage api #136
Conversation
after uploading avatar if you refresh the browser it will show related to this bug on gotrue-js supabase/auth-js#67 |
…s for "profile" data (public), and "user data" (private)
…to feat/storage-api
…to feat/storage-api
…to feat/storage-api
…uard against null sessions
example/next-storage/pages/index.tsx
Outdated
setSession(session) | ||
}) | ||
|
||
realtimeProfiles = supabase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@phamhieu you had a problem with realtime only returning one item right? What code changes did you make to fix it? I want to make sure we're suggesting the best method for next.js/react
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I update the code to use useReducer
. Then on realtime callback i use dispatch
to trigger change on my UI. It works nicely
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 🔥
file: File | ||
): Promise<{ data: { message: string } | null; error: Error | null }> { | ||
try { | ||
if (!isBrowser()) throw new Error('No browser detected.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to check what other libs are doing here for the Node environment
🎉 This PR is included in version 1.7.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
What kind of change does this PR introduce?
Implement storage api with a
next-storage
example app.What is the current behavior?
To run example app:
supabase-js
and checkoutfeat/storage-api
branchnpm run build
cd example/next-storage/
.env.local
file undernext-storage
appnpm run dev
What is the new behavior?
Feel free to include screenshots if it includes visual changes.
Additional context