{"size": 1677, "ext": "js", "max_stars_repo_path": "src/components/WelcomeScreen/WelcomeScreen.js", "max_stars_repo_name": "aehm-dacrea/temp", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/WelcomeScreen/WelcomeScreen.js", "max_issues_repo_name": "aehm-dacrea/temp", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/WelcomeScreen/WelcomeScreen.js", "max_forks_repo_name": "aehm-dacrea/temp", "max_forks_repo_forks_event_min_datetime": "2020-07-09T17:00:50.000Z", "max_forks_repo_forks_event_max_datetime": "2021-04-02T12:01:20.000Z"}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": 2, "avg_line_length": 47.9142857143, "max_line_length": 211, "alphanum_fraction": 0.6612999404}
import React, { useEffect} from 'react'
import { document } from 'browser-monads'

import useWindowWidth from '../../hooks/useWindowWidth'
import T from '../utils/i18n'
import styles from './WelcomeScreen.module.css'
import logo from './../../assets/Logo_Pizza_house.svg'

const WelcomeScreen = (props) => {
  const width = useWindowWidth()
  useEffect(() => {
    document.querySelector(`.${styles.header}`).classList.add(`${styles.headerMounted}`)
    document.querySelector(`.${styles.address}`).classList.add(`${styles.addressMounted}`)
    document.querySelector(`.${styles.logo}`).style.opacity = 1
    const timer = setTimeout(() => {
      document.querySelector(`.${styles.order}`).classList.add(styles.orderMounted)
    }, 300)
    return () => clearTimeout(timer)
  }, [])

  return (
    <div className={styles.container}>
      <img className={styles.logo} src={logo} alt='Логотип PizzaHouse'/>
      <div className={styles.textContainer} style={width > 1300 ? T(null, {paddingLeft: '50px'}) : {paddingLeft: 0}}>
        <p className={styles.header}>{T('Сделай заказ прямо сейчас!', 'Faceți comandă acum!')}</p>
        <p className={styles.address}>{width > 650 ? T('Мы находимся на Московском проспекте 14/1', 'Noi suntem pe adresa Bulevardul Moscova 14/1') : T('Московский проспект 14/1', 'Bulevardul Moscova 14/1')}</p>
        {/* <a target="_blank" rel="noopener noreferrer" href={`https://www.straus.md/${T('ru', 'ro')}/restaurant/pizza-house`} className={styles.order}>{T('Звоните!', 'Sunați!')}</a> */}
        <div onClick={props.open} className={styles.order}>{T('Звоните!', 'Sunați!')}</div>
      </div>
    </div>
  )
}

export default WelcomeScreen
