mirror of
https://github.com/plausible/analytics.git
synced 2024-12-19 15:41:56 +03:00
17 lines
384 B
JavaScript
17 lines
384 B
JavaScript
|
import React from 'react';
|
||
|
import ReactDOM from 'react-dom';
|
||
|
|
||
|
import Router from './router'
|
||
|
|
||
|
const container = document.getElementById('stats-react-container')
|
||
|
|
||
|
if (container) {
|
||
|
const site = {
|
||
|
domain: container.dataset.domain,
|
||
|
offset: container.dataset.offset,
|
||
|
hasGoals: container.dataset.hasGoals === 'true'
|
||
|
}
|
||
|
|
||
|
ReactDOM.render(<Router site={site} />, container);
|
||
|
}
|