mirror of
https://github.com/plausible/analytics.git
synced 2024-12-01 11:56:19 +03:00
ff64fccb18
* WIP * Add site switcher * Run ci * Highlight active site * Do not show sites dropdown for logged out users * Add site switcher to realtime view * Remove blue border when logged out
27 lines
616 B
JavaScript
27 lines
616 B
JavaScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import 'url-search-params-polyfill';
|
|
|
|
import Router from './router'
|
|
import ErrorBoundary from './error-boundary'
|
|
|
|
const container = document.getElementById('stats-react-container')
|
|
|
|
if (container) {
|
|
const site = {
|
|
domain: container.dataset.domain,
|
|
offset: container.dataset.offset,
|
|
hasGoals: container.dataset.hasGoals === 'true'
|
|
}
|
|
|
|
const loggedIn = container.dataset.loggedIn === 'true'
|
|
|
|
const app = (
|
|
<ErrorBoundary>
|
|
<Router site={site} loggedIn={loggedIn} />
|
|
</ErrorBoundary>
|
|
)
|
|
|
|
ReactDOM.render(app, container);
|
|
}
|