/* @flow */
/** @jsx node */

import { node, Fragment, type ChildType } from 'jsx-pragmatic/src';

export function TrackingBeacon({ url, nonce } : { url : string, nonce : ?string }) : ChildType {
    return (
        <Fragment>
            <style innerHTML={ `
                    .tracking-beacon: {
                        visibility: hidden;
                        position: absolute;
                        height: 1px;
                        width: 1px;
                    }
                ` } />
            <img class='tracking-beacon' src={ url } nonce={ nonce } />
        </Fragment>
    );
}

/* @flow */
/** @jsx node */

import { node, Fragment, type ChildType } from 'jsx-pragmatic/src';

export function TrackingBeacon({ url, nonce } : { url : string, nonce : ?string }) : ChildType {
    return (
        <Fragment>
            <style
                nonce={ nonce }
                innerHTML={ `
                    .tracking-beacon: {
                        visibility: hidden;
                        position: absolute;
                        height: 1px;
                        width: 1px;
                    }
                ` } />
            <img class='tracking-beacon' src={ url } />
        </Fragment>
    );
}

Add nonce to style tag
Add nonce to style tag
