📈 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
src/modals to ts
kruzhambusc486f6762267
diff --git a/src/modals/Forecast.jsx b/src/modals/Forecast.tsxsimilarity index 81%rename from src/modals/Forecast.jsxrename to src/modals/Forecast.tsxindex b49b48c37..210d6e251 100644--- a/src/modals/Forecast.jsx+++ b/src/modals/Forecast.tsx@@ -11,12 +11,20 @@ const DEFAULT_PERIOD = 3const Forecast = ({onClose, onSubmit, isOpened, activeTB, tb,-}) => {- const { t } = useTranslation('common')- const [period, setPeriod] = useState(DEFAULT_PERIOD)- const [error, setError] = useState(null)+}: {+ onClose: () => void,+ onSubmit: (period: number) => void,+ isOpened: boolean,+ activeTB: string,+ tb: string,+}): React.ReactNode => {+ const { t }: {+ t: (key: string, options?: { [key: string]: string | number }) => string,+ } = useTranslation('common')+ const [period, setPeriod] = useState<string | number>(DEFAULT_PERIOD)+ const [error, setError] = useState<string | null>(null)- const handleInput = (e) => {+ const handleInput = (e: React.ChangeEvent<HTMLInputElement>) => {const { value } = e.targetsetPeriod(value)diff --git a/src/modals/PaidFeature.jsx b/src/modals/PaidFeature.tsxsimilarity index 87%rename from src/modals/PaidFeature.jsxrename to src/modals/PaidFeature.tsxindex 23303e964..3cf57aafa 100644--- a/src/modals/PaidFeature.jsx+++ b/src/modals/PaidFeature.tsx@@ -6,7 +6,10 @@ import PropTypes from 'prop-types'import Modal from 'ui/Modal'import routes from 'routes'-const PaidFeature = ({ onClose, isOpened }) => {+const PaidFeature = ({ onClose, isOpened }: {+ onClose: () => void,+ isOpened: boolean,+}): React.ReactNode => {const { t } = useTranslation('common')const history = useHistory()