feat: Track page load (#19)

This commit is contained in:
Lautaro Petaccio 2024-04-12 09:17:14 -03:00 committed by GitHub
parent 9df2952ba1
commit ba5d1693e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 91 additions and 91 deletions

View File

@ -4,20 +4,12 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
href="https://fonts.googleapis.com/css?family=Inconsolata&display=swap"
rel="stylesheet"
/>
<link
rel="sitemap"
type="application/xml"
title="Sitemap"
href="/sitemap.xml"
/>
<link href="https://fonts.googleapis.com/css?family=Inconsolata&display=swap" rel="stylesheet" />
<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />
<link rel="manifest" href="/manifest.json" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Decentraland - Profile" />
<title>Decentraland - Profile</title>
<meta name="description" content="Decentraland - Cast" />
<title>Decentraland - Cast</title>
</head>
<body>
<div id="root"></div>

View File

@ -9,9 +9,9 @@ const CameraIcon = ({ enabled = true, ...props }: Props) => {
id="Vector"
d="M28.28 24.2V30.536C28.28 31.0132 27.8932 31.4 27.416 31.4H11.864C11.3868 31.4 11 31.0132 11 30.536V17.864C11 17.3868 11.3868 17 11.864 17H27.416C27.8932 17 28.28 17.3868 28.28 17.864V24.2ZM28.28 24.2L35.5029 18.1809C36.0656 17.712 36.92 18.1121 36.92 18.8447V29.5554C36.92 30.2879 36.0656 30.6881 35.5029 30.2191L28.28 24.2Z"
stroke="#FCFCFC"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
</g>
</svg>
@ -20,11 +20,11 @@ const CameraIcon = ({ enabled = true, ...props }: Props) => {
<path
d="M28.28 24.2V30.536C28.28 31.0132 27.8932 31.4 27.416 31.4H11.864C11.3868 31.4 11 31.0132 11 30.536V17.864C11 17.3868 11.3868 17 11.864 17H27.416C27.8932 17 28.28 17.3868 28.28 17.864V24.2ZM28.28 24.2L35.5029 18.1809C36.0656 17.712 36.92 18.1121 36.92 18.8447V29.5554C36.92 30.2879 36.0656 30.6881 35.5029 30.2191L28.28 24.2Z"
stroke="#FCFCFC"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path d="M35.5 10L8 37.5" stroke="#FCFCFC" stroke-width="2" stroke-linecap="round" />
<path d="M35.5 10L8 37.5" stroke="#FCFCFC" strokeWidth="2" strokeLinecap="round" />
</svg>
)
}

View File

@ -7,21 +7,21 @@ const MicrophoneIcon = ({ enabled = true, ...props }: Props) => {
<path
d="M14.4468 5.03394C14.4468 2.80606 12.6407 1 10.4128 1C8.18496 1 6.37891 2.80606 6.37891 5.03394V13.1018C6.37891 15.3297 8.18496 17.1358 10.4128 17.1358C12.6407 17.1358 14.4468 15.3297 14.4468 13.1018V5.03394Z"
stroke="white"
stroke-width="1.92"
strokeWidth="1.92"
/>
<path
d="M1 11.7573V13.1019C1 18.3003 5.21414 22.5144 10.4125 22.5144C15.6109 22.5144 19.8251 18.3003 19.8251 13.1019V11.7573"
stroke="white"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M10.4128 22.5145V27.8931M10.4128 27.8931H6.37891M10.4128 27.8931H14.4468"
stroke="white"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
) : (
@ -29,23 +29,23 @@ const MicrophoneIcon = ({ enabled = true, ...props }: Props) => {
<path
d="M19.4468 7.03394C19.4468 4.80606 17.6407 3 15.4128 3C13.185 3 11.3789 4.80606 11.3789 7.03394V15.1018C11.3789 17.3297 13.185 19.1358 15.4128 19.1358C17.6407 19.1358 19.4468 17.3297 19.4468 15.1018V7.03394Z"
stroke="white"
stroke-width="1.92"
strokeWidth="1.92"
/>
<path
d="M6 13.7573V15.1019C6 20.3003 10.2141 24.5144 15.4125 24.5144C20.6109 24.5144 24.8251 20.3003 24.8251 15.1019V13.7573"
stroke="white"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M15.4128 24.5145V29.8931M15.4128 29.8931H11.3789M15.4128 29.8931H19.4468"
stroke="white"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path d="M28.5 1L1 28.5" stroke="#FCFCFC" stroke-width="2" stroke-linecap="round" />
<path d="M28.5 1L1 28.5" stroke="#FCFCFC" strokeWidth="2" strokeLinecap="round" />
</svg>
)
}

View File

@ -4,15 +4,15 @@ import { Props } from './Icons.type'
const PeopleIcon = (props: Props) => (
<svg width="32" height="33" viewBox="0 0 32 33" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M24.0003 13.8333C24.0003 13.0987 23.403 12.5 22.667 12.5C21.931 12.5 21.3337 13.0987 21.3337 13.8333C21.3337 14.568 21.931 15.1667 22.667 15.1667C23.403 15.1667 24.0003 14.568 24.0003 13.8333ZM26.667 13.8333C26.667 16.0387 24.8723 17.8333 22.667 17.8333C20.4617 17.8333 18.667 16.0387 18.667 13.8333C18.667 11.628 20.4617 9.83333 22.667 9.83333C24.8723 9.83333 26.667 11.628 26.667 13.8333ZM14.667 9.83333C14.667 8.36267 13.471 7.16667 12.0003 7.16667C10.5297 7.16667 9.33366 8.36267 9.33366 9.83333C9.33366 11.304 10.5297 12.5 12.0003 12.5C13.471 12.5 14.667 11.304 14.667 9.83333ZM17.3337 9.83333C17.3337 12.7747 14.9417 15.1667 12.0003 15.1667C9.05899 15.1667 6.66699 12.7747 6.66699 9.83333C6.66699 6.892 9.05899 4.5 12.0003 4.5C14.9417 4.5 17.3337 6.892 17.3337 9.83333ZM18.587 20.5613C19.7457 19.6653 21.1723 19.1667 22.667 19.1667C26.343 19.1667 29.3337 22.1573 29.3337 25.8333C29.3337 26.5693 28.7377 27.1667 28.0003 27.1667C27.263 27.1667 26.667 26.5693 26.667 25.8333C26.667 23.628 24.8723 21.8333 22.667 21.8333C21.7563 21.8333 20.891 22.1453 20.1923 22.6987C20.9177 24.0267 21.3337 25.5493 21.3337 27.1667C21.3337 27.9027 20.7377 28.5 20.0003 28.5C19.263 28.5 18.667 27.9027 18.667 27.1667C18.667 23.4907 15.6763 20.5 12.0003 20.5C8.32433 20.5 5.33366 23.4907 5.33366 27.1667C5.33366 27.9027 4.73766 28.5 4.00033 28.5C3.26299 28.5 2.66699 27.9027 2.66699 27.1667C2.66699 22.02 6.85499 17.8333 12.0003 17.8333C14.5697 17.8333 16.8977 18.8773 18.587 20.5613Z"
fill="#231F20"
/>
<mask id="mask0_283_1438" style={{ maskType: 'luminance' }} maskUnits="userSpaceOnUse" x="2" y="4" width="28" height="25">
<path
fill-rule="evenodd"
clip-rule="evenodd"
fillRule="evenodd"
clipRule="evenodd"
d="M24.0003 13.8333C24.0003 13.0987 23.403 12.5 22.667 12.5C21.931 12.5 21.3337 13.0987 21.3337 13.8333C21.3337 14.568 21.931 15.1667 22.667 15.1667C23.403 15.1667 24.0003 14.568 24.0003 13.8333ZM26.667 13.8333C26.667 16.0387 24.8723 17.8333 22.667 17.8333C20.4617 17.8333 18.667 16.0387 18.667 13.8333C18.667 11.628 20.4617 9.83333 22.667 9.83333C24.8723 9.83333 26.667 11.628 26.667 13.8333ZM14.667 9.83333C14.667 8.36267 13.471 7.16667 12.0003 7.16667C10.5297 7.16667 9.33366 8.36267 9.33366 9.83333C9.33366 11.304 10.5297 12.5 12.0003 12.5C13.471 12.5 14.667 11.304 14.667 9.83333ZM17.3337 9.83333C17.3337 12.7747 14.9417 15.1667 12.0003 15.1667C9.05899 15.1667 6.66699 12.7747 6.66699 9.83333C6.66699 6.892 9.05899 4.5 12.0003 4.5C14.9417 4.5 17.3337 6.892 17.3337 9.83333ZM18.587 20.5613C19.7457 19.6653 21.1723 19.1667 22.667 19.1667C26.343 19.1667 29.3337 22.1573 29.3337 25.8333C29.3337 26.5693 28.7377 27.1667 28.0003 27.1667C27.263 27.1667 26.667 26.5693 26.667 25.8333C26.667 23.628 24.8723 21.8333 22.667 21.8333C21.7563 21.8333 20.891 22.1453 20.1923 22.6987C20.9177 24.0267 21.3337 25.5493 21.3337 27.1667C21.3337 27.9027 20.7377 28.5 20.0003 28.5C19.263 28.5 18.667 27.9027 18.667 27.1667C18.667 23.4907 15.6763 20.5 12.0003 20.5C8.32433 20.5 5.33366 23.4907 5.33366 27.1667C5.33366 27.9027 4.73766 28.5 4.00033 28.5C3.26299 28.5 2.66699 27.9027 2.66699 27.1667C2.66699 22.02 6.85499 17.8333 12.0003 17.8333C14.5697 17.8333 16.8977 18.8773 18.587 20.5613Z"
fill={props?.fill ?? 'white'}
/>

View File

@ -6,23 +6,23 @@ const PhoneIcon = (props: Props) => (
<path
d="M1.59961 1.66504C1.59961 8.08588 5.60104 12.4595 12.208 12.4595"
stroke={props?.stroke ?? 'white'}
stroke-width="1.44"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.44"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M12.2082 11.9941V9.83621C12.2082 9.51588 11.9966 9.23408 11.689 9.14477L9.69381 8.56552C9.46247 8.49836 9.21287 8.55134 9.02876 8.70668L6.3457 10.9705"
stroke={props?.stroke ?? 'white'}
stroke-width="0.72"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="0.72"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M2.15576 1.66474L4.31332 1.62516C4.63359 1.61929 4.91924 1.82571 5.01418 2.13165L5.62992 4.11585C5.70131 4.34592 5.65292 4.59645 5.50098 4.78338L3.28675 7.50751"
stroke={props?.stroke ?? 'white'}
stroke-width="0.72"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="0.72"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)

View File

@ -6,16 +6,16 @@ const SendIcon = (props: Props) => (
<path
d="M25.7422 5.75146L14.0085 24.4085L12.2228 15.2179L4.19727 10.3964L25.7422 5.75146Z"
stroke={props.stroke ?? 'white'}
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M12.167 15.2561L25.7411 5.75146"
stroke={props.stroke ?? 'white'}
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)

View File

@ -4,24 +4,24 @@ import { Props } from './Icons.type'
const ShareScreenIcon = ({ enabled = false, ...props }: Props) => {
return enabled ? (
<svg width="29" height="21" viewBox="0 0 29 21" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<rect x="0.96" y="0.96" width="27.08" height="19.08" rx="1.92" stroke="#1E1E1E" stroke-width="1.92" />
<rect x="0.96" y="0.96" width="27.08" height="19.08" rx="1.92" stroke="#1E1E1E" strokeWidth="1.92" />
<path
d="M14.3471 15.2164V6.16M14.3471 6.16L18.6941 10.5071M14.3471 6.16L10 10.5071"
stroke="#1E1E1E"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
) : (
<svg width="29" height="21" viewBox="0 0 29 21" fill="none" xmlns="http://www.w3.org/2000/svg" {...props}>
<rect x="0.96" y="0.96" width="27.08" height="19.08" rx="1.92" stroke="white" stroke-width="1.92" />
<rect x="0.96" y="0.96" width="27.08" height="19.08" rx="1.92" stroke="white" strokeWidth="1.92" />
<path
d="M14.3471 15.2163V6.15997M14.3471 6.15997L18.6941 10.507M14.3471 6.15997L10 10.507"
stroke="white"
stroke-width="1.92"
stroke-linecap="round"
stroke-linejoin="round"
strokeWidth="1.92"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
)

View File

@ -1,9 +1,10 @@
/* eslint-disable import/order */
import 'semantic-ui-css/semantic.min.css'
import React from 'react'
import React, { useEffect } from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { RouterProvider, createBrowserRouter } from 'react-router-dom'
import { BrowserRouter, Route, Routes, useLocation } from 'react-router-dom'
import { getAnalytics } from 'decentraland-dapps/dist/modules/analytics/utils'
import ModalProvider from 'decentraland-dapps/dist/providers/ModalProvider'
import TranslationProvider from 'decentraland-dapps/dist/providers/TranslationProvider'
import WalletProvider from 'decentraland-dapps/dist/providers/WalletProvider'
@ -17,33 +18,40 @@ import Conference from './components/Pages/Conference'
import 'decentraland-ui/dist/themes/alternative/light-theme.css'
import './index.css'
const router = createBrowserRouter([
{
path: '/',
element: <ConnectToWorld />
},
{
path: 'sign-in',
element: <SignInPage />
},
{
path: '/meet/:server',
element: <Conference />
}
])
const SiteRoutes = () => {
const location = useLocation()
const analytics = getAnalytics()
const component = (
<React.StrictMode>
<Provider store={initStore()}>
<WalletProvider>
<TranslationProvider locales={Object.keys(locales)}>
<ModalProvider components={modals}>
<RouterProvider router={router} />
</ModalProvider>
</TranslationProvider>
</WalletProvider>
</Provider>
</React.StrictMode>
)
useEffect(() => {
analytics.page()
}, [location, analytics])
ReactDOM.render(component, document.getElementById('root') as HTMLElement)
return (
<Routes>
<Route path="/" element={<ConnectToWorld />} />
<Route path="sign-in" element={<SignInPage />} />
<Route path="/meet/:server" element={<Conference />} />
<Route path="*" element={<ConnectToWorld />} />
</Routes>
)
}
const component = () => {
return (
<React.StrictMode>
<Provider store={initStore()}>
<WalletProvider>
<TranslationProvider locales={Object.keys(locales)}>
<ModalProvider components={modals}>
<BrowserRouter>
<SiteRoutes />
</BrowserRouter>
</ModalProvider>
</TranslationProvider>
</WalletProvider>
</Provider>
</React.StrictMode>
)
}
ReactDOM.render(component(), document.getElementById('root') as HTMLElement)