This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const post = async (data) => { | |
const { url } = data; | |
delete data.url; | |
const params = { | |
method: 'POST', | |
body: JSON.stringify(data), | |
headers: { | |
'Content-Type': 'application/json', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
submitForm() { | |
const {name, email, message} = this.formElement.current.elements; | |
const payload = { | |
url: 'api/contact', | |
name: name, | |
email: email, | |
message: message, | |
}; | |
post(payload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
render() { | |
const {name, email, message} = this.state.fields; | |
return ( | |
<form ref={this.formElement} | |
onSubmit={() => this.submitForm()}> | |
<input type="text" | |
value={name} | |
onChange={event => this.onInputChange(event, 'name')} | |
name="name" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.use(express.static(path.join(__dirname, 'client', 'build'))); | |
app.get('*', (req, res) => { | |
res.sendFile(path.join(__dirname, 'client', 'build', 'index.html')); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import '../utils'; | |
.bbc_arabic { | |
direction: #{map-deep-get($SCRIPT_TYPE_METRICS,BBC_ARABIC,DIRECTION)}; | |
font-family: #{map-deep-get($SCRIPT_TYPE_METRICS,BBC_ARABIC,FONT_FAMILY)}; | |
#content * { | |
visibility: visible; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This will be the BriefTemplate model which all Briefs will need to use. A BriefTemplate will always reference a 'type' which will be | |
// how we identify what further fields to use for that particular Brief. | |
{ | |
type: { | |
type: String, | |
enum: ['WEBSITE', 'ANDROID_APP'], | |
default: 'WEBSITE' | |
}, | |
status: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from 'react'; | |
const post = async (data) => { | |
const { url } = data; | |
delete data.url; | |
const params = { | |
method: 'POST', | |
body: JSON.stringify(data), |
OlderNewer