-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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: add tanstack query and optimistic fetch on brains settings page #1087
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Risk Level 2 - /home/runner/work/quivr/quivr/frontend/app/App.tsx The code seems to be well written and follows good practices. However, there is a potential issue with the useEffect(() => {
void fetchAllBrains();
void fetchAndSetActiveBrain();
void fetchPublicPrompts();
}, [session && session.user]); Risk Level 3 - /home/runner/work/quivr/quivr/frontend/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/hooks/useSettingsTab.ts
const formValues = useMemo(() => {
// calculate form values based on brain
}, [brain]);
try {
setIsSettingAsDefault(true);
// operation
} catch (error) {
// handle error
} finally {
setIsSettingAsDefault(false);
} 🔄🧠🔧 Powered by Code Review GPT |
Nice PR. Love it! 🫶🏽 |
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.
Magnifique ! Thanks mamadz !!
…#1087) * refactor: remove <TrackingWrapper /> * feat: add tanstack query * feat: add optimistic fetch to brain settings page
Before:
Screen.Recording.2023-09-01.at.12.38.30.mov
After:
Screen.Recording.2023-09-01.at.12.39.13.mov
To improve UX on first load, we can add a loader... WDYT @Chloeroumengas @danielcgilibert @lamiabnn ?