fix spelling

This commit is contained in:
Alaister Young committed 2023-08-01 17:41:01 +10:00
1 parent 45cdd2bba3
commit a49ec74ccc
3 files changed
+4 -4

No files matched your search

@@ -51,7 +51,7 @@ export function Default() {
)
}
export function withSeperators() {
export function withSeparators() {
return (
<Select>
<SelectTrigger className="w-[180px]">
@@ -292,7 +292,7 @@ const ProjectLinker = ({
loadingForeignProjects ||
loadingSupabaseProjects ||
isLoading ||
// check wether both project types are not undefined
// check whether both project types are not undefined
!selectedSupabaseProject ||
!selectedForeignProject
}
+2 -2
View File
@@ -72,7 +72,7 @@ return (
### Mutations
The parameter `onError` can be passed when intializing the mutation, where an appropriate UI behavior should be triggered (usually a toast will be fine). If `onError` is not provided, we will then default to a toast message that will be called from within the mutation itself which should handle most cases. However, if there is a specific way that the error should be handled, then this should be passed via the `onError` parameter. (There's no need to repeat the error handling if the default behavior is sufficient)
The parameter `onError` can be passed when initializing the mutation, where an appropriate UI behavior should be triggered (usually a toast will be fine). If `onError` is not provided, we will then default to a toast message that will be called from within the mutation itself which should handle most cases. However, if there is a specific way that the error should be handled, then this should be passed via the `onError` parameter. (There's no need to repeat the error handling if the default behavior is sufficient)
We should also aim to convert most of the `mutateAsync` to `mutate`, otherwise we'd need to wrap all the `mutateAsync` calls in try catches just to ensure that the client doesn't crash when the request throws an error in the mutation. There's currently a mix due to the Form component that we're using, in particular when a method from the Form component such as `resetForm` needs to be called after the request is completed successfully.
@@ -88,7 +88,7 @@ const { mutate: someAction } = useMutation({
const onConfirm = async () => {
// Assuming that your mutation needs a URL param like project ref
// This check is just to satistfy the linting - there's an implicit assumption that
// This check is just to satisfy the linting - there's an implicit assumption that
// projectRef here will definitely be available since its obtained from the URL
if (!projectRef) return console.error('Project ref is required')