Skip to content

Commit b46e69c

Browse files
authored
Merge pull request #1481 from hackforla/1473-text-error-with-metal-appliances-search-filter
Added regex to fix unwanted string char.
2 parents 19395ff + cb32841 commit b46e69c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

client/components/Map/RequestDetail.jsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const styles = theme => ({
2626
width: '100%',
2727
},
2828
requestType: {
29-
...theme.typography.h4,
29+
...theme.typography.h5,
3030
marginRight: 5,
3131
},
3232
icon: {
@@ -102,6 +102,9 @@ class RequestDetail extends React.Component {
102102
address,
103103
} = pinsInfo[requestId];
104104

105+
// regex fix to replace "/" in typeName
106+
const formattedTypeName = typeName.split('/').join(' ');
107+
105108
const { color } = requestTypes.find(({ typeId }) => typeId === requestTypeId);
106109
const { website } = agencies.find(({ agencyId }) => agencyId === aId);
107110
const daysOpen = moment().diff(moment(createdDate), 'days');
@@ -115,7 +118,7 @@ class RequestDetail extends React.Component {
115118
alignItems="center"
116119
>
117120
<Grid className={classes.requestType} item>
118-
{typeName}
121+
{formattedTypeName}
119122
</Grid>
120123
<Grid item>
121124
<FiberManualRecordIcon

0 commit comments

Comments
 (0)