Skip to content

Commit

Permalink
[feat-5019]: resolved feedback from Jelle and Linda (#2726)
Browse files Browse the repository at this point in the history
resolved feedback
- text changes 
- problem of not always showing icon when navigating to detail page is solved
- fixed getting data from store in overview of maincategories
  • Loading branch information
SireeKoolenWijkstra authored Oct 11, 2023
1 parent ee3d380 commit 574a076
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
11 changes: 7 additions & 4 deletions src/signals/settings/categories/components/Detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ export const CategoryDetail = ({
navigate(redirectURL)
}

dispatch(fetchCategories())

const payloadDefaultTexts = formMethods.getValues('standard_texts')?.map(
(defaultText: StandardText, index): StatusMessagesCategory => ({
position: index,
Expand All @@ -164,13 +166,14 @@ export const CategoryDetail = ({
}
}, [
isDirty,
dispatch,
formMethods,
patch,
categoryURL,
postStandardTextsCategory,
categoryId,
navigate,
redirectURL,
postStandardTextsCategory,
categoryId,
patch,
categoryURL,
])

if (!data || !historyData) return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const IconInput = ({ formMethods, icon }: Props) => {
if (!fileDataURL) confirmed = true
if (fileDataURL) {
confirmed = await isConfirmed(
'Let op, je verandert het icoon. ',
'Let op, je wijzigt het icoon ',
'Er wordt geen back-up van het icoon gemaakt.'
)
}
Expand Down Expand Up @@ -87,7 +87,7 @@ export const IconInput = ({ formMethods, icon }: Props) => {
event.preventDefault()

const confirmed = await isConfirmed(
'Let op, je verwijdert het icoon. ',
'Let op, je verwijdert het icoon ',
'Er wordt geen back-up van het icoon gemaakt.'
)

Expand Down Expand Up @@ -125,6 +125,10 @@ export const IconInput = ({ formMethods, icon }: Props) => {
}
}, [file])

useEffect(() => {
setFileDataURL(icon)
}, [icon])

return (
<FieldGroup>
<StyledHeading>Icoon</StyledHeading>
Expand Down

0 comments on commit 574a076

Please sign in to comment.