Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Minor performance improvements

Blue Mousea862ce4e5ea1
diff --git a/web/app/pages/Auth/ChangeEmail/index.tsx b/web/app/pages/Auth/ChangeEmail/index.tsx
index 1440f41b1..36de36eab 100644
--- a/web/app/pages/Auth/ChangeEmail/index.tsx
+++ b/web/app/pages/Auth/ChangeEmail/index.tsx
@@ -1,4 +1,4 @@
-import { useState, useEffect, memo } from 'react'
+import { useState, useEffect } from 'react'
import { useParams, Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
@@ -100,4 +100,4 @@ const ChangeEmail = () => {
)
}
-export default memo(ChangeEmail)
+export default ChangeEmail
diff --git a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
index f03d309a0..970411a84 100644
--- a/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
+++ b/web/app/pages/Auth/CheckYourInbox/CheckYourInbox.tsx
@@ -1,4 +1,4 @@
-import React, { useMemo, memo, useEffect } from 'react'
+import React, { useMemo, useEffect } from 'react'
import { useNavigate } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import { EnvelopeIcon } from '@heroicons/react/24/outline'
@@ -11,7 +11,7 @@ import sagaActions from 'redux/sagas/actions'
import { StateType, useAppDispatch } from 'redux/store'
import routes from 'utils/routes'
-const CheckYourInbox = (): JSX.Element => {
+const CheckYourInbox = () => {
const { t } = useTranslation('common')
const { loading, user } = useSelector((state: StateType) => state.auth)
const navigate = useNavigate()
@@ -83,9 +83,7 @@ const CheckYourInbox = (): JSX.Element => {
)
}
-export default memo(
- withAuthentication(CheckYourInbox, {
- shouldBeAuthenticated: true,
- redirectPath: routes.signup,
- }),
-)
+export default withAuthentication(CheckYourInbox, {
+ shouldBeAuthenticated: true,
+ redirectPath: routes.signup,
+})
diff --git a/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx b/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx
index f31e37554..e6e1d74b2 100644
--- a/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx
+++ b/web/app/pages/Auth/CreateNewPassword/CreateNewPassword.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import React, { useState, useEffect } from 'react'
import { Link, useNavigate, useParams } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import _size from 'lodash/size'
@@ -154,4 +154,4 @@ const CreateNewPassword = () => {
)
}
-export default memo(withAuthentication(CreateNewPassword, auth.notAuthenticated))
+export default withAuthentication(CreateNewPassword, auth.notAuthenticated)
diff --git a/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx b/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
index dd6f39b0c..2b0bd51e1 100644
--- a/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
+++ b/web/app/pages/Auth/ForgotPassword/ForgotPassword.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import React, { useState, useEffect } from 'react'
import { Link, useNavigate } from '@remix-run/react'
import { useTranslation, Trans } from 'react-i18next'
import _keys from 'lodash/keys'
@@ -133,4 +133,4 @@ const ForgotPassword = () => {
)
}
-export default memo(withAuthentication(ForgotPassword, auth.notAuthenticated))
+export default withAuthentication(ForgotPassword, auth.notAuthenticated)
diff --git a/web/app/pages/Auth/Socialised/index.tsx b/web/app/pages/Auth/Socialised/index.tsx
index e054d349d..5cc852a33 100644
--- a/web/app/pages/Auth/Socialised/index.tsx
+++ b/web/app/pages/Auth/Socialised/index.tsx
@@ -1,4 +1,4 @@
-import React, { useEffect, useState, memo } from 'react'
+import { useEffect, useState } from 'react'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
@@ -10,10 +10,10 @@ import { SSO_PROVIDERS } from 'redux/constants'
import Loader from 'ui/Loader'
import routes from 'utils/routes'
-const Socialised = (): JSX.Element => {
+const Socialised = () => {
const { t } = useTranslation('common')
- const [loading, setLoading] = useState<boolean>(true)
- const [isError, setIsError] = useState<boolean>(false)
+ const [loading, setLoading] = useState(true)
+ const [isError, setIsError] = useState(false)
useEffect(() => {
// For some reason, Google redirects to a hash URL, let's fix it
@@ -119,4 +119,4 @@ const Socialised = (): JSX.Element => {
)
}
-export default memo(Socialised)
+export default Socialised
diff --git a/web/app/pages/Auth/VerifyEmail/index.tsx b/web/app/pages/Auth/VerifyEmail/index.tsx
index f1d583ac0..4e8d3215e 100644
--- a/web/app/pages/Auth/VerifyEmail/index.tsx
+++ b/web/app/pages/Auth/VerifyEmail/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import { useState, useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { useParams, Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
@@ -10,12 +10,12 @@ import sagaActions from 'redux/sagas/actions'
import Loader from 'ui/Loader'
import routes from 'utils/routes'
-const VerifyEmail = (): JSX.Element => {
+const VerifyEmail = () => {
const { t } = useTranslation('common')
const dispatch = useDispatch()
const { id } = useParams()
- const [loading, setLoading] = useState<boolean>(true)
- const [error, setError] = useState<string>('')
+ const [loading, setLoading] = useState(true)
+ const [error, setError] = useState('')
useEffect(() => {
setLoading(true)
@@ -116,4 +116,4 @@ const VerifyEmail = (): JSX.Element => {
)
}
-export default memo(VerifyEmail)
+export default VerifyEmail
diff --git a/web/app/pages/Organisations/Settings/TransferProject/TransferProjectReject.tsx b/web/app/pages/Organisations/Settings/TransferProject/TransferProjectReject.tsx
index 244927135..99db5bfff 100644
--- a/web/app/pages/Organisations/Settings/TransferProject/TransferProjectReject.tsx
+++ b/web/app/pages/Organisations/Settings/TransferProject/TransferProjectReject.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import React, { useState, useEffect } from 'react'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { XCircleIcon, InformationCircleIcon } from '@heroicons/react/24/solid'
@@ -8,10 +8,10 @@ import Loader from 'ui/Loader'
import { rejectTransferProject } from 'api'
import routes from 'utils/routes'
-const TransferProjectReject = (): JSX.Element => {
+const TransferProjectReject = () => {
const { t } = useTranslation('common')
- const [loading, setLoading] = useState<boolean>(true)
- const [error, setError] = useState<string>('')
+ const [loading, setLoading] = useState(true)
+ const [error, setError] = useState('')
const handleConfirm = async (token: string) => {
try {
@@ -104,4 +104,4 @@ const TransferProjectReject = (): JSX.Element => {
)
}
-export default memo(TransferProjectReject)
+export default TransferProjectReject
diff --git a/web/app/pages/Organisations/Settings/index.tsx b/web/app/pages/Organisations/Settings/index.tsx
index feaa7a130..56eb2127c 100644
--- a/web/app/pages/Organisations/Settings/index.tsx
+++ b/web/app/pages/Organisations/Settings/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo, useCallback } from 'react'
+import React, { useState, useEffect, useCallback } from 'react'
import { toast } from 'sonner'
import { Link, useNavigate } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
@@ -336,4 +336,4 @@ const OrganisationSettings = () => {
)
}
-export default memo(withAuthentication(OrganisationSettings, auth.authenticated))
+export default withAuthentication(OrganisationSettings, auth.authenticated)
diff --git a/web/app/pages/Project/ConfirmShare/index.tsx b/web/app/pages/Project/ConfirmShare/index.tsx
index 324e3568c..99c42dbcb 100644
--- a/web/app/pages/Project/ConfirmShare/index.tsx
+++ b/web/app/pages/Project/ConfirmShare/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import { useState, useEffect } from 'react'
import { useDispatch } from 'react-redux'
import { useParams, Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
@@ -8,14 +8,13 @@ import _split from 'lodash/split'
import sagaActions from 'redux/sagas/actions'
import Loader from 'ui/Loader'
import routes from 'utils/routes'
-import { AppDispatch } from 'redux/store'
const ConfirmShare = () => {
const { t } = useTranslation('common')
- const dispatch: AppDispatch = useDispatch()
+ const dispatch = useDispatch()
const { id } = useParams()
- const [loading, setLoading] = useState<boolean>(true)
- const [error, setError] = useState<string>('')
+ const [loading, setLoading] = useState(true)
+ const [error, setError] = useState('')
useEffect(() => {
setLoading(true)
@@ -106,4 +105,4 @@ const ConfirmShare = () => {
)
}
-export default memo(ConfirmShare)
+export default ConfirmShare
diff --git a/web/app/pages/Project/New/index.tsx b/web/app/pages/Project/New/index.tsx
index 72cf26378..9179ee4cc 100644
--- a/web/app/pages/Project/New/index.tsx
+++ b/web/app/pages/Project/New/index.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo, useMemo } from 'react'
+import React, { useState, useEffect, useMemo } from 'react'
import { Link, useNavigate } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { useSelector, useDispatch } from 'react-redux'
@@ -201,4 +201,4 @@ const NewProject = () => {
)
}
-export default memo(withAuthentication(NewProject, auth.authenticated))
+export default withAuthentication(NewProject, auth.authenticated)
diff --git a/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx b/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
index 540ec3ff1..e96c62ab3 100644
--- a/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
+++ b/web/app/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import React, { useState, useEffect } from 'react'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
@@ -8,10 +8,10 @@ import Loader from 'ui/Loader'
import { confirmTransferProject } from 'api'
import routes from 'utils/routes'
-const TransferProjectConfirm = (): JSX.Element => {
+const TransferProjectConfirm = () => {
const { t } = useTranslation('common')
- const [loading, setLoading] = useState<boolean>(true)
- const [error, setError] = useState<string>('')
+ const [loading, setLoading] = useState(true)
+ const [error, setError] = useState('')
const handleConfirm = async (token: string) => {
try {
@@ -104,4 +104,4 @@ const TransferProjectConfirm = (): JSX.Element => {
)
}
-export default memo(TransferProjectConfirm)
+export default TransferProjectConfirm
diff --git a/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx b/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
index 244927135..76a9cb1a9 100644
--- a/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
+++ b/web/app/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect, memo } from 'react'
+import { useState, useEffect } from 'react'
import { Link } from '@remix-run/react'
import { useTranslation } from 'react-i18next'
import { XCircleIcon, InformationCircleIcon } from '@heroicons/react/24/solid'
@@ -8,10 +8,10 @@ import Loader from 'ui/Loader'
import { rejectTransferProject } from 'api'
import routes from 'utils/routes'
-const TransferProjectReject = (): JSX.Element => {
+const TransferProjectReject = () => {
const { t } = useTranslation('common')
- const [loading, setLoading] = useState<boolean>(true)
- const [error, setError] = useState<string>('')
+ const [loading, setLoading] = useState(true)
+ const [error, setError] = useState('')
const handleConfirm = async (token: string) => {
try {
@@ -104,4 +104,4 @@ const TransferProjectReject = (): JSX.Element => {
)
}
-export default memo(TransferProjectReject)
+export default TransferProjectReject
diff --git a/web/app/pages/UserSettings/UserSettings.tsx b/web/app/pages/UserSettings/UserSettings.tsx
index 8b72ee31c..d883235da 100644
--- a/web/app/pages/UserSettings/UserSettings.tsx
+++ b/web/app/pages/UserSettings/UserSettings.tsx
@@ -161,7 +161,7 @@ const UserSettings = ({
setAPIKey,
user,
dontRemember,
- isPaidTierUsed, // setThemeType, themeType,
+ isPaidTierUsed,
linkSSO,
unlinkSSO,
theme,
diff --git a/web/app/utils/server.ts b/web/app/utils/server.ts
index eb2575ad0..b102b0cb5 100644
--- a/web/app/utils/server.ts
+++ b/web/app/utils/server.ts
@@ -247,11 +247,17 @@ export const getPageMeta = (t: typeof i18next.t, url?: string, _pathname?: strin
}
break
+ case routes.organisations:
+ result = {
+ title: t('titles.organisations'),
+ }
+ break
+
default:
break
}
- // project_settings, captcha_settings, project, captcha titles are set dynamically
+ // organisation, project_settings, captcha_settings, project, captcha titles are set dynamically
// todo: create_alert, alert_settings, project_protected_password, create_monitor, monitor_settings,