Skip to content

Commit

Permalink
More render capitlizations
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Jul 16, 2021
1 parent cd0da74 commit f72181d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/EventCard/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Button } from 'src/components/Button'
import TagDisplay from 'src/components/Tags/TagDisplay/TagDisplay'
import FlagIconEvents from 'src/components/Icons/FlagIcon/FlagIcon'
import { IEvent } from '../../models/events.models'
import { getMonth, getDay } from 'src/utils/helpers'
import { getMonth, getDay, capitalizeFirstLetter } from 'src/utils/helpers'
import { LinkTargetBlank } from '../Links/LinkTargetBlank/LinkTargetBlank'

interface IProps {
Expand Down Expand Up @@ -76,7 +76,7 @@ export const EventCard = (props: IProps) => (
>
<Flex alignItems={'center'} width={1}>
<Text bold color="black" fontSize={[3, 3, 4]}>
{props.event.title}
{capitalizeFirstLetter(props.event.title)}
</Text>
</Flex>
<Text auxiliary width={1}>
Expand Down
11 changes: 8 additions & 3 deletions src/pages/Howto/Content/Howto/Step/Step.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PureComponent } from 'react';
import { PureComponent } from 'react'
import Linkify from 'react-linkify'
import ReactPlayer from 'react-player'
import { Box } from 'rebass'
Expand All @@ -8,6 +8,7 @@ import ImageGallery from 'src/components/ImageGallery'
import Text from 'src/components/Text'
import { IHowtoStep } from 'src/models/howto.models'
import { IUploadedFileMeta } from 'src/stores/storage'
import { capitalizeFirstLetter } from 'src/utils/helpers'
import styled from 'styled-components'

interface IProps {
Expand Down Expand Up @@ -57,11 +58,15 @@ export default class Step extends PureComponent<IProps> {
>
<Flex width={[1, 1, 4 / 9]} py={4} px={4} flexDirection={'column'}>
<Heading medium mb={0}>
{step.title}
{/* HACK 2021-07-16 - new howtos auto capitalize title but not older */}
{capitalizeFirstLetter(step.title)}
</Heading>
<Box>
<Text preLine paragraph mt={3} color={'grey'}>
<Linkify>{step.text}</Linkify>
<Linkify>
{/* HACK 2021-07-16 - new howtos auto capitalize title but not older */}
{capitalizeFirstLetter(step.text)}
</Linkify>
</Text>
</Box>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export class UserInfosSection extends React.Component<IProps, IState> {
<Field
data-cy="info-description"
name="about"
modifiers={{ capitalize: true }}
component={TextAreaField}
placeholder="Describe in details what you do and who you are. Write in English otherwise your profile won't be approved."
validate={required}
Expand Down

0 comments on commit f72181d

Please sign in to comment.