lowercase project title
This commit is contained in:
parent
6ca6f8ea3a
commit
cc968d79e8
|
@ -19,7 +19,7 @@ import StatusTextField from '../base/TextField'
|
||||||
import IconTextField from '../base/IconTextField'
|
import IconTextField from '../base/IconTextField'
|
||||||
import Icon from '../base/icons/IconByName'
|
import Icon from '../base/icons/IconByName'
|
||||||
import { convertTokenAmountUsd } from '../../utils/prices'
|
import { convertTokenAmountUsd } from '../../utils/prices'
|
||||||
import { setMediaType } from '../../utils/project'
|
import { generateChatRoom, setMediaType } from '../../utils/project'
|
||||||
import MediaView from '../base/MediaView'
|
import MediaView from '../base/MediaView'
|
||||||
import { isVideo } from '../../utils/images'
|
import { isVideo } from '../../utils/images'
|
||||||
import BreadCrumb from '../base/BreadCrumb'
|
import BreadCrumb from '../base/BreadCrumb'
|
||||||
|
@ -30,7 +30,6 @@ const { addProject } = LiquidPledging.methods
|
||||||
const { TOO_LONG, REQUIRED } = errorStrings
|
const { TOO_LONG, REQUIRED } = errorStrings
|
||||||
|
|
||||||
const hoursToSeconds = hours => hours * 60 * 60
|
const hoursToSeconds = hours => hours * 60 * 60
|
||||||
const generateChatRoom = title => `#status-${title.replace(/\s/g, '')}`
|
|
||||||
|
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
title: Yup.string().max(20, TOO_LONG).required(REQUIRED),
|
title: Yup.string().max(20, TOO_LONG).required(REQUIRED),
|
||||||
|
|
|
@ -216,7 +216,7 @@ const SubmissionSection = ({ classes, projectData, projectId, profileData, start
|
||||||
<div className={classes.chatRoom}>
|
<div className={classes.chatRoom}>
|
||||||
<Icon name="oneOnOneChat" />
|
<Icon name="oneOnOneChat" />
|
||||||
<a className={classes.chatLink} href={`https://get.status.im/chat/public/${manifest.chatRoom.replace('#', '')}`}>
|
<a className={classes.chatLink} href={`https://get.status.im/chat/public/${manifest.chatRoom.replace('#', '')}`}>
|
||||||
<div className={classes.chatText}>{`Join ${manifest.chatRoom}`}</div>
|
<div className={classes.chatText}>{`Join ${manifest.chatRoom.toLowerCase()}`}</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes.chatRoom}>
|
<div className={classes.chatRoom}>
|
||||||
|
|
|
@ -3,6 +3,8 @@ import { uniqBy, length } from 'ramda'
|
||||||
|
|
||||||
const { utils } = web3
|
const { utils } = web3
|
||||||
|
|
||||||
|
export const generateChatRoom = title => `#status-${title.replace(/\s/g, '').toLowerCase()}`
|
||||||
|
|
||||||
export const formatProjectId = id => utils.toHex(id)
|
export const formatProjectId = id => utils.toHex(id)
|
||||||
const getFile = filePath => filePath.split('/').slice(-1)[0]
|
const getFile = filePath => filePath.split('/').slice(-1)[0]
|
||||||
const formatMedia = content => {
|
const formatMedia = content => {
|
||||||
|
|
Loading…
Reference in New Issue