<commit_before>import React, { Component } from 'react';
import PropTypes from 'prop-types';

import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router-dom';
import { compose } from 'react-apollo';
import { Grid, Row, Col } from 'react-bootstrap';


// graphql
import settingsQuery from '../../../modules/settings/graphql/queries/list';
import tenantsQuery from '../../../modules/tenants/graphql/queries/tenants';


import './Footer.css';


class Footer extends Component {

	constructor(props) {
		super(props);
		this.state = {};
	}

	componentWillReceiveProps(props) {
		const tenantId = sessionStorage.getItem('tenantId');

		this.setState({
			settings: props.settingsQuery.loading ? {} : props.settingsQuery.settings.find(x => x.tenantId === tenantId),
			tenant: props.tenantsQuery.loading ? undefined : props.tenantsQuery.tenants.find(x => x._id === tenantId)
		});
	}

	render() {
		const { settings, tenant } = this.state;
		const now = new Date();
		const year = now.getFullYear();

		return (
			<footer className="block-shadow">
				<Grid>
					<Row>
						<div className="footer-nav-row">
							<div className="footer-nav-links" role="navigation">
								{tenant && !tenant.isAnnotation ?
									<div>
										<Link to="/commentary">
											<FlatButton
												label="Commentary"
											/>
										</Link>
										<Link to="/commenters">
											<FlatButton
												label="Commentators"
											/>
										</Link>
										<Link to="/words">
											<FlatButton
												label="Words"
											/>
										</Link>
										<Link to="/ideas">
											<FlatButton
												label="Ideas"
											/>
										</Link>
										<Link to={settings && settings.aboutURL ? settings.aboutURL : '/about'}>
											<FlatButton
												label="About"
											/>
										</Link>
									</div>
									: ''}
							</div>
						</div>
					</Row>
					<Row>
						<div className="footerLogoRow clearfix">
							<Col md={5}>
								<h1 className="logo">{settings ? settings.name : undefined}</h1>
							</Col>

							<Col md={2}>
								<a href="http://chs.harvard.edu" target="_blank" rel="noopener noreferrer">
									<img
										className="site-logo"
										src="/images/center_for_hellenic_studies_lighthouse.png"
										role="presentation"
										alt="The Center for Hellenic Studies"
									/>
								</a>
							</Col>

							<Col md={5}>
								<p className="lead">
									For more information about the Commentary or general media inquiries,
									please contact &nbsp;
									<a href={settings && settings.emails ? `mailto:${settings.emails.contact}` : ''}>
										{settings && settings.emails ? settings.emails.contact : ''}
									</a>.
								</p>

								<p className="lead">
									This website is provided by <a href="http://chs.harvard.edu" target="_blank" rel="noopener noreferrer">
										The Center for Hellenic Studies
									</a>.
								</p>
							</Col>
						</div>
					</Row>
					<Row>
						<Col md={8} mdOffset={2}>
							<p className="fade-1-4 copyright">
								Copyright {year} The Center for Hellenic Studies.
								See our <a href="/terms">terms and privacy policy</a>
							</p>
						</Col>
					</Row>
				</Grid><commit_msg>add eu privacy policy to footer<commit_after>import React, { Component } from 'react';
import PropTypes from 'prop-types';

import FlatButton from 'material-ui/FlatButton';
import { Link } from 'react-router-dom';
import { compose } from 'react-apollo';
import { Grid, Row, Col } from 'react-bootstrap';


// graphql
import settingsQuery from '../../../modules/settings/graphql/queries/list';
import tenantsQuery from '../../../modules/tenants/graphql/queries/tenants';


import './Footer.css';


class Footer extends Component {

	constructor(props) {
		super(props);
		this.state = {};
	}

	componentWillReceiveProps(props) {
		const tenantId = sessionStorage.getItem('tenantId');

		this.setState({
			settings: props.settingsQuery.loading ? {} : props.settingsQuery.settings.find(x => x.tenantId === tenantId),
			tenant: props.tenantsQuery.loading ? undefined : props.tenantsQuery.tenants.find(x => x._id === tenantId)
		});
	}

	render() {
		const { settings, tenant } = this.state;
		const now = new Date();
		const year = now.getFullYear();

		return (
			<footer className="block-shadow">
				<Grid>
					<Row>
						<div className="footer-nav-row">
							<div className="footer-nav-links" role="navigation">
								{tenant && !tenant.isAnnotation ?
									<div>
										<Link to="/commentary">
											<FlatButton
												label="Commentary"
											/>
										</Link>
										<Link to="/commenters">
											<FlatButton
												label="Commentators"
											/>
										</Link>
										<Link to="/words">
											<FlatButton
												label="Words"
											/>
										</Link>
										<Link to="/ideas">
											<FlatButton
												label="Ideas"
											/>
										</Link>
										<Link to={settings && settings.aboutURL ? settings.aboutURL : '/about'}>
											<FlatButton
												label="About"
											/>
										</Link>
									</div>
									: ''}
							</div>
						</div>
					</Row>
					<Row>
						<div className="footerLogoRow clearfix">
							<Col md={5}>
								<h1 className="logo">{settings ? settings.name : undefined}</h1>
							</Col>

							<Col md={2}>
								<a href="http://chs.harvard.edu" target="_blank" rel="noopener noreferrer">
									<img
										className="site-logo"
										src="/images/center_for_hellenic_studies_lighthouse.png"
										role="presentation"
										alt="The Center for Hellenic Studies"
									/>
								</a>
							</Col>

							<Col md={5}>
								<p className="lead">
									For more information about the Commentary or general media inquiries,
									please contact &nbsp;
									<a href={settings && settings.emails ? `mailto:${settings.emails.contact}` : ''}>
										{settings && settings.emails ? settings.emails.contact : ''}
									</a>.
								</p>

								<p className="lead">
									This website is provided by <a href="http://chs.harvard.edu" target="_blank" rel="noopener noreferrer">
										The Center for Hellenic Studies
									</a>.
								</p>
							</Col>
						</div>
					</Row>
					<Row>
						<Col md={8} mdOffset={2}>
							<p className="fade-1-4 copyright">
								Copyright {year} The Center for Hellenic Studies.
								See our <a href="/terms">terms and privacy policy</a> and <a href="https://gdpr.harvard.edu/eeaprivacydisclosures">EU/EEA Privacy Disclosures</a>.
							</p>
						</Col>
					</Row>
				</Grid>
{'fraction_non_alphanumeric': 0.15098825977113983, 'fraction_numerical': 0.0026749888542131075, 'mean_word_length': 2.0328977016674177, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 0, '>': 123, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2639083', 'n_tokens_mistral': 3209, 'n_tokens_neox': 2016, 'n_words': 449}