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!

add: routers

kruzhambusb72c99ccd932
diff --git a/src/App.tsx b/src/App.tsx
index 52a7b5ee1..e70129c92 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -57,6 +57,8 @@ const CaptchaSettings = lazy(() => import('pages/Captcha/Settings'))
const CaptchaView = lazy(() => import('pages/Captcha/View'))
const ConfirmReportsShare = lazy(() => import('pages/Project/Settings/Emails/ConfirmReportsShare'))
const MediaAndPress = lazy(() => import('pages/Press'))
+const TransferProjectConfirm = lazy(() => import('pages/Project/Settings/TransferProject/TransferProjectConfirm'))
+const TransferProjectReject = lazy(() => import('pages/Project/Settings/TransferProject/TransferProjectReject'))
const minimalFooterPages = [
'/projects', '/dashboard', '/settings', '/contact',
@@ -225,6 +227,8 @@ const App = () => {
<Route path={routes.captcha} component={CaptchaView} exact />
<Route path={routes.confirm_subcription} component={ConfirmReportsShare} exact />
<Route path={routes.press} component={MediaAndPress} exact />
+ <Route path={routes.transfer_confirm} component={TransferProjectConfirm} exact />
+ <Route path={routes.transfer_reject} component={TransferProjectReject} exact />
<Route path='*' component={NotFound} />
</Switch>
</Suspense>
diff --git a/src/pages/Dashboard/Dashboard.tsx b/src/pages/Dashboard/Dashboard.tsx
index 23ab289dc..959839914 100644
--- a/src/pages/Dashboard/Dashboard.tsx
+++ b/src/pages/Dashboard/Dashboard.tsx
@@ -24,7 +24,9 @@ import _values from 'lodash/values'
import { withAuthentication, auth } from 'hoc/protected'
import Title from 'components/Title'
import Loader from 'ui/Loader'
-import { ActivePin, InactivePin, WarningPin } from 'ui/Pin'
+import {
+ ActivePin, InactivePin, WarningPin, CustomPin,
+} from 'ui/Pin'
import PulsatingCircle from 'ui/icons/PulsatingCircle'
import routes from 'routes'
import {
@@ -112,7 +114,7 @@ const ProjectCart = ({
}
{
isTransferring && (
- <WarningPin className='mr-2 !bg-indigo-500 dark:!bg-indigo-600 !text-gray-300 dark:!text-gray-300' label={t('common.transferring')} />
+ <CustomPin className='mr-2 !bg-indigo-500 dark:!bg-indigo-600 !text-gray-300 dark:!text-gray-300' label={t('common.transferring')} />
)
}
{active ? (
diff --git a/src/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx b/src/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
index b845aafcb..a9a87f141 100644
--- a/src/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
+++ b/src/pages/Project/Settings/TransferProject/TransferProjectConfirm.tsx
@@ -1,5 +1,5 @@
import React, { useState, useEffect, memo } from 'react'
-import { useParams, Link } from 'react-router-dom'
+import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { CheckCircleIcon, XCircleIcon } from '@heroicons/react/24/solid'
@@ -13,9 +13,6 @@ const TransferProjectConfirm = (): JSX.Element => {
const { t }: {
t: (key: string) => string
} = useTranslation('common')
- const { id }: {
- id: string
- } = useParams()
const [loading, setLoading] = useState<boolean>(true)
const [error, setError] = useState<string>('')
diff --git a/src/pages/Project/Settings/TransferProject/TransferProjectReject.tsx b/src/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
index 086cf5168..2c397f297 100644
--- a/src/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
+++ b/src/pages/Project/Settings/TransferProject/TransferProjectReject.tsx
@@ -1,5 +1,5 @@
import React, { useState, useEffect, memo } from 'react'
-import { useParams, Link } from 'react-router-dom'
+import { Link } from 'react-router-dom'
import { useTranslation } from 'react-i18next'
import { XCircleIcon, InformationCircleIcon } from '@heroicons/react/24/solid'
@@ -9,8 +9,6 @@ import Loader from 'ui/Loader'
import { rejectTransferProject } from 'api'
import routes from 'routes'
-// http://localhost:3000/projects/dDfoJStW17Xv/subscribers/invite?token=5e1eab3b-c018-46d4-b051-ed7025b50405
-
const TransferProjectReject = (): JSX.Element => {
const { t }: {
t: (key: string) => string
@@ -96,7 +94,7 @@ const TransferProjectReject = (): JSX.Element => {
<div className='sm:ml-6'>
<div className='sm:border-l max-w-prose sm:border-gray-200 sm:pl-6'>
<h1 className='text-4xl font-extrabold text-gray-900 dark:text-gray-50 tracking-tight sm:text-5xl'>
- {t('apiNotifications.acceptInvitation')}
+ {t('apiNotifications.transferProjectReject')}
</h1>
</div>
<div className='mt-8 flex space-x-3 sm:border-l sm:border-transparent sm:pl-6'>
diff --git a/src/routes.ts b/src/routes.ts
index d5b487419..4ee82a931 100644
--- a/src/routes.ts
+++ b/src/routes.ts
@@ -27,6 +27,8 @@ const routes = Object.freeze({
create_alert: '/projects/:pid/alerts/create',
alert_settings: '/projects/:pid/alerts/settings/:id',
press: '/press',
+ transfer_confirm: '/project/transfer/confirm',
+ transfer_reject: '/project/transfer/cancel',
})
export default routes
diff --git a/src/ui/Pin.tsx b/src/ui/Pin.tsx
index 1bbf1088f..3d194454d 100644
--- a/src/ui/Pin.tsx
+++ b/src/ui/Pin.tsx
@@ -38,6 +38,15 @@ const WarningPin = ({ label, className }: {
</p>
)
+const CustomPin = ({ label, className }: {
+ label: string,
+ className?: string,
+}): JSX.Element => (
+ <p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full', className)}>
+ {label}
+ </p>
+)
+
ActivePin.propTypes = propTypes
ActivePin.defaultProps = defaultProps
@@ -47,8 +56,12 @@ WarningPin.defaultProps = defaultProps
InactivePin.propTypes = propTypes
InactivePin.defaultProps = defaultProps
+CustomPin.propTypes = propTypes
+CustomPin.defaultProps = defaultProps
+
export {
ActivePin,
InactivePin,
WarningPin,
+ CustomPin,
}