summaryrefslogtreecommitdiff
path: root/client/src/lib/views/credits.js
blob: 74020fa23814edb1fd21510e1fa679e244139b6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React, { Component } from 'react';
import {
  StyleSheet,
  View,
} from 'react-native';

import ScrollableContainer from '../components/scrollableContainer'
import ClearText from '../components/text'

export default class Credits extends Component {
  constructor(props) {
    super()
  }
  render() {
    // let body = '<p>' + this.props.content.body + '</p>'
    let credits = this.props.content.body.split('\n').map( (s,i) => {
      s = s.replace('\r', '')
      if (s.match('~')) {
        s = s.replace('~ ', '').toUpperCase()
        style = styles.smallText
      }
      else {
        style = styles.text
      }
      return (
        <ClearText key={i} style={style}>{s}</ClearText>
      )
    })
    return (
      <ScrollableContainer heading='Production Acknowledgements'>
        <View style={styles.body}>
          {credits}
        </View>
      </ScrollableContainer>
    )
  }
}

const styles = StyleSheet.create({
  body: {
    width: '75%',
    alignItems: 'center',
    paddingBottom: 200,
  },
  smallText: {
    fontWeight: 'bold',
    fontSize: 13,
    marginTop: 20,
  },
  text: {
  },
})