Embed @wasabipesto's charts on /analytics
This commit is contained in:
parent
5978f4b1cb
commit
3bc4e7b336
|
@ -15,6 +15,8 @@ import { getDailyBets } from 'web/lib/firebase/bets'
|
||||||
import { getDailyComments } from 'web/lib/firebase/comments'
|
import { getDailyComments } from 'web/lib/firebase/comments'
|
||||||
import { getDailyContracts } from 'web/lib/firebase/contracts'
|
import { getDailyContracts } from 'web/lib/firebase/contracts'
|
||||||
import { getDailyNewUsers } from 'web/lib/firebase/users'
|
import { getDailyNewUsers } from 'web/lib/firebase/users'
|
||||||
|
import { SiteLink } from 'web/components/site-link'
|
||||||
|
import { Linkify } from 'web/components/linkify'
|
||||||
|
|
||||||
export const getStaticProps = fromPropz(getStaticPropz)
|
export const getStaticProps = fromPropz(getStaticPropz)
|
||||||
export async function getStaticPropz() {
|
export async function getStaticPropz() {
|
||||||
|
@ -192,9 +194,22 @@ export default function Analytics(props: {
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<Page>
|
<Page>
|
||||||
<CustomAnalytics {...props} />
|
<Tabs
|
||||||
<Spacer h={8} />
|
tabs={[
|
||||||
{!IS_PRIVATE_MANIFOLD && <FirebaseAnalytics />}
|
{
|
||||||
|
title: 'Activity',
|
||||||
|
content: <CustomAnalytics {...props} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Market Stats',
|
||||||
|
content: <WasabiCharts />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Google Analytics',
|
||||||
|
content: <FirebaseAnalytics />,
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
/>
|
||||||
</Page>
|
</Page>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -431,7 +446,6 @@ export function FirebaseAnalytics() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Title text="Google Analytics" />
|
|
||||||
<p className="text-gray-500">
|
<p className="text-gray-500">
|
||||||
Less accurate; includes all viewers (not just signed-in users).
|
Less accurate; includes all viewers (not just signed-in users).
|
||||||
</p>
|
</p>
|
||||||
|
@ -447,3 +461,28 @@ export function FirebaseAnalytics() {
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function WasabiCharts() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<p className="text-gray-500">
|
||||||
|
Courtesy of <Linkify text="@wasabipesto" />; originally found{' '}
|
||||||
|
<SiteLink
|
||||||
|
className="font-bold"
|
||||||
|
href="https://wasabipesto.com/jupyter/manifold/"
|
||||||
|
>
|
||||||
|
here.
|
||||||
|
</SiteLink>
|
||||||
|
</p>
|
||||||
|
<Spacer h={4} />
|
||||||
|
<iframe
|
||||||
|
className="w-full"
|
||||||
|
height={12000}
|
||||||
|
src="https://wasabipesto.com/jupyter/manifold/"
|
||||||
|
frameBorder="0"
|
||||||
|
style={{ border: 0 }}
|
||||||
|
allowFullScreen
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user