import { Component, ReactNode } from 'react';
import * as React from 'react';

interface ICodePromoBarProps {
    changeState: () => void;
}

export class CodePromoBar extends Component<ICodePromoBarProps, {}> {
    public render(): ReactNode {
        return (
            <div className='nonstop-video-codes'>
                <div className='nonstop-video-codes__cta'>
                    <div className='ns-container'>
                        <h2>Got a code? Redeem it now</h2>
                        <a onClick={() => this.props.changeState()} className='btn-nonstop btn-nonstop-primary'>Redeem code</a>
                    </div>
                </div>
            </div>
        );
    }
}