-
Notifications
You must be signed in to change notification settings - Fork 177
Harrison/changes #67
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
base: main
Are you sure you want to change the base?
Harrison/changes #67
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
console.error('[Login] Login error:', error.message); | ||
} | ||
} catch (error) { | ||
console.error('[Login] Error creating Supabase client or signing in:', error); |
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.
Try catch inside a react component is a bit odd, not usual
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.
Try catch on line 7 is weird. But this one is quite usual. I've used try catch within handler function.
Although hooks must not be wrapped in try catch. You can use try catch inside the hooks
It's an onclick handler function and it's completely fine. But Can use currying function to ensure component doesn't rerender
eg
const handleLogin = useCallback((loginMethod: string) => () {
}, [])
and on the button
onClick={handleLogin('google')}
|
||
export function Thread() { | ||
const { session } = useUser(); | ||
const [data, setData] = useState(null); |
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.
Looks like this isn't used
|
||
return ( | ||
<div> | ||
{/* Your thread component UI */} |
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.
Beautiful UI!
} | ||
} | ||
|
||
// Keeping for backward compatibility |
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.
We don't actually need this right?
assistantId, | ||
threadId: threadId ?? null, | ||
onCustomEvent: (event, options) => { |
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'm assuming this is removed because you don't need genui for this app?
No description provided.