Commit 2a875649 authored by Stefan Probst's avatar Stefan Probst
Browse files

chore: adjust wording of toast message

parent 0e9c0111
Pipeline #178023 passed with stage
in 5 minutes and 27 seconds
......@@ -223,7 +223,7 @@ function CreateActorForm(props: CreateActorFormProps) {
toast.success('Sucessfully created actor.')
},
onError() {
toast.error('Failed to create actor.')
toast.error('Failed to submit actor.')
},
onSettled() {
props.onDismiss()
......
......@@ -39,7 +39,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: DatasetDto) {
toast.success(`Successfully created ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -54,7 +54,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to create ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -41,7 +41,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: DatasetDto) {
toast.success(`Successfully updated ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -56,7 +56,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to update ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -39,7 +39,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: PublicationDto) {
toast.success(`Successfully created ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -54,7 +54,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to create ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -41,7 +41,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: PublicationDto) {
toast.success(`Successfully updated ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -56,7 +56,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to update ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -38,7 +38,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: ToolDto) {
toast.success(`Successfully created ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -53,7 +53,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to create ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -40,7 +40,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: ToolDto) {
toast.success(`Successfully updated ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -55,7 +55,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to update ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -38,7 +38,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: TrainingMaterialDto) {
toast.success(`Successfully created ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -53,7 +53,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to create ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -40,7 +40,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: TrainingMaterialDto) {
toast.success(`Successfully updated ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -55,7 +55,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to update ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -38,7 +38,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: WorkflowDto) {
toast.success(`Successfully created ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -53,7 +53,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to create ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
......@@ -40,7 +40,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
const queryClient = useQueryClient()
const create = useItemMutation({
onSuccess(data: WorkflowDto) {
toast.success(`Successfully updated ${categoryLabel}.`)
toast.success(`Successfully submitted ${categoryLabel}.`)
queryClient.invalidateQueries({
queryKey: ['itemSearch'],
......@@ -55,7 +55,7 @@ export function ItemForm(props: ItemFormProps<ItemFormValues>): JSX.Element {
router.push({ pathname: `/${data.category}/${data.persistentId}` })
},
onError() {
toast.error(`Failed to update ${categoryLabel}.`)
toast.error(`Failed to submit ${categoryLabel}.`)
},
})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment