-
Notifications
You must be signed in to change notification settings - Fork 886
feat: add warning message when trying to delete active template #10142
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
Conversation
site/src/api/queries/workspaces.ts
Outdated
return ["workspaces", query] as const; | ||
} | ||
|
||
export function workspacesByQuery(query: string) { |
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 think we've just been re-using the API
function name for these, so this one would be workspaces
const queryText = `template:${templateName}`; | ||
const workspaceCountQuery = useQuery({ | ||
...workspacesByQuery(queryText), | ||
select: (res) => res.count, |
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.
TIL!
type TemplateMenuProps = { | ||
templateName: string; | ||
templateVersion: string; | ||
templateId: string; | ||
onDelete: () => void; | ||
}> = ({ templateName, templateVersion, onDelete }) => { | ||
}; |
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.
my hero!
Closes #9348 and builds upon #10111 from last Friday
Changes made