-
-
Notifications
You must be signed in to change notification settings - Fork 708
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
fix: no requests before project loaded #7096
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -5,5 +5,5 @@ export const useShowDependentFeatures = (project: string) => { | |||
const { dependenciesExist } = useCheckDependenciesExist(project); | |||
const { isOss } = useUiConfig(); | |||
|
|||
return Boolean(isOss() ? dependenciesExist : true); | |||
return Boolean(project) && Boolean(isOss() ? dependenciesExist : true); |
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.
dependent features were checking pending change requests under the hood but they were checking them for the empty project. The empty project came from the placeholder used in useFeature. After this fix if the useFeature returns the placeholder project (with empty project) we don't show dependencies section.
featureId={feature.name} | ||
onComplete={refetchFeature} | ||
<ConditionallyRender | ||
condition={Boolean(feature.project)} |
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.
same guard for the mark completed. We need project since hooks inside the dialogue assume it's not empty
About the changes
Check if project is provided because we don't want hooks making 404 requests during initial data load for the project.
Important files
Discussion points