📈 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!
TypeScript chartsclickhousedockergdprgoogle-analyticsmetricsmonitoringmysqlnestjsprivacyredisself-hostedselfhostedstatisticstailwindcssweb-analyticswebanalyticswebsite
ConfirmShare to ts
kruzhambus8eca14a2b10b
diff --git a/src/pages/Project/ConfirmShare/index.jsx b/src/pages/Project/ConfirmShare/index.tsxsimilarity index 91%rename from src/pages/Project/ConfirmShare/index.jsxrename to src/pages/Project/ConfirmShare/index.tsxindex 7f5715803..6bcde2296 100644--- a/src/pages/Project/ConfirmShare/index.jsx+++ b/src/pages/Project/ConfirmShare/index.tsx@@ -7,22 +7,28 @@ import _split from 'lodash/split'import Title from 'components/Title'import UIActions from 'redux/reducers/ui'+import sagaActions from 'redux/sagas/actions'import Loader from 'ui/Loader'import routes from 'routes'+import { AppDispatch } from 'redux/store'const ConfirmShare = () => {- const { t } = useTranslation('common')- const dispatch = useDispatch()- const { id } = useParams()- const [loading, setLoading] = useState(true)- const [error, setError] = useState('')+ const { t }: {+ t: (key: string) => string+ } = useTranslation('common')+ const dispatch: AppDispatch = useDispatch()+ const { id }: {+ id: string+ } = useParams()+ const [loading, setLoading] = useState<boolean>(true)+ const [error, setError] = useState<string>('')useEffect(() => {setLoading(true)const path = _split(window.location.pathname, '/')[1]dispatch(- UIActions.shareVerifyAsync(+ sagaActions.shareVerifyAsync({ path, id },() => setLoading(false),(verifyError) => {diff --git a/src/redux/sagas/actions/index.ts b/src/redux/sagas/actions/index.tsindex ad0940d59..ad37afa49 100644--- a/src/redux/sagas/actions/index.ts+++ b/src/redux/sagas/actions/index.ts@@ -77,7 +77,8 @@ const deleteAccountAsync = (errorCallback?: (e: string) => {}, successCallback?:const shareVerifyAsync = (data: {id: string,-}, successfulCallback?: () => {}, errorCallback?: () => {}) => ({+ path: string+}, successfulCallback?: () => void, errorCallback?: (error: string) => void) => ({type: types.SHARE_VERIFY_ASYNC,payload: { data, successfulCallback, errorCallback },})