
import { useEffect } from 'react';
import { sendGoal } from '@utils';
import styles from './Row.module.css';

export const Row = ({
    tag = "#SC_Sretenka",
    addr = "Сретенка, 27, стр. 1, Москва"
}) => {

    function tagToName(tag) {
        const name = tag.slice(4);
        if (name === name.toUpperCase()) {
            return name.charAt(0).toUpperCase() + name.slice(1).toLowerCase();
        }
        return name;
    }

    return (
        <div className={styles.row}>
            <span className={styles.tag}>{`Surf Coffee® х ${tagToName(tag)} — #SC_${tagToName(tag)}`}</span>
            <span className={styles.addr}>{addr}</span>
        </div>
    )
}