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!

ui to ts

kruzhambus29540266ad1e
diff --git a/package.json b/package.json
index b6be6812b..15ee0f0da 100644
--- a/package.json
+++ b/package.json
@@ -178,6 +178,7 @@
"@types/node": "^18.15.3",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
+ "@types/react-flatpickr": "^3.8.8",
"@types/react-router-dom": "^5.3.3",
"@types/react-router-hash-link": "^2.4.5",
"autoprefixer": "^10.4.14",
diff --git a/src/components/EventsRunningOutBanner.tsx b/src/components/EventsRunningOutBanner.tsx
index 0d0e8fcb1..d661654aa 100644
--- a/src/components/EventsRunningOutBanner.tsx
+++ b/src/components/EventsRunningOutBanner.tsx
@@ -9,7 +9,11 @@ import UIActions from 'redux/reducers/ui'
import { SHOW_BANNER_AT_PERC } from 'redux/constants'
const EventsRunningOutBanner = () => {
- const { t } = useTranslation('common')
+ const { t }: {
+ t: (key: string, item?: {
+ [key: string]: string | number
+ }) => string
+ } = useTranslation('common')
const dispatch = useAppDispatch()
const showNoEventsLeftBanner = useSelector((state: StateType) => state.ui.misc.showNoEventsLeftBanner)
const [showModeInfoModal, setShowModeInfoModal] = useState(false)
diff --git a/src/modals/Forecast.tsx b/src/modals/Forecast.tsx
index 210d6e251..3a6f180f7 100644
--- a/src/modals/Forecast.tsx
+++ b/src/modals/Forecast.tsx
@@ -17,7 +17,7 @@ const Forecast = ({
isOpened: boolean,
activeTB: string,
tb: string,
-}): React.ReactNode => {
+}): JSX.Element => {
const { t }: {
t: (key: string, options?: { [key: string]: string | number }) => string,
} = useTranslation('common')
diff --git a/src/modals/PaidFeature.tsx b/src/modals/PaidFeature.tsx
index 3cf57aafa..1a5eea186 100644
--- a/src/modals/PaidFeature.tsx
+++ b/src/modals/PaidFeature.tsx
@@ -9,8 +9,10 @@ import routes from 'routes'
const PaidFeature = ({ onClose, isOpened }: {
onClose: () => void,
isOpened: boolean,
-}): React.ReactNode => {
- const { t } = useTranslation('common')
+}): JSX.Element => {
+ const { t }: {
+ t: (key: string, options?: { [key: string]: string | number }) => string,
+ } = useTranslation('common')
const history = useHistory()
const onSubmit = () => {
diff --git a/src/pages/CrashHandler/index.tsx b/src/pages/CrashHandler/index.tsx
index f5f1715ce..942f818c4 100644
--- a/src/pages/CrashHandler/index.tsx
+++ b/src/pages/CrashHandler/index.tsx
@@ -4,7 +4,7 @@ import { ExclamationTriangleIcon, ChevronDownIcon, ChevronUpIcon } from '@heroic
import { CONTACT_EMAIL } from 'redux/constants'
interface CrashHandlerProps {
- children: React.ReactNode
+ children: JSX.Element
}
interface CrashHandlerState {
diff --git a/src/ui/Alert.jsx b/src/ui/Alert.tsx
similarity index 93%
rename from src/ui/Alert.jsx
rename to src/ui/Alert.tsx
index 7db80f4d0..d53f63dbd 100644
--- a/src/ui/Alert.jsx
+++ b/src/ui/Alert.tsx
@@ -8,7 +8,14 @@ import {
const AlertTemplate = ({
message, options, className, close,
-}) => {
+}: {
+ message: string,
+ options: {
+ type: 'info' | 'success' | 'error',
+ },
+ className: string,
+ close: () => void,
+}): JSX.Element => {
const { type } = options
const isInfo = type === 'info'
const isSuccess = type === 'success'
diff --git a/src/ui/Beta.jsx b/src/ui/Beta.tsx
similarity index 92%
rename from src/ui/Beta.jsx
rename to src/ui/Beta.tsx
index 897ae5679..59ce88a30 100644
--- a/src/ui/Beta.jsx
+++ b/src/ui/Beta.tsx
@@ -7,7 +7,9 @@ import { WarningPin } from './Pin'
const Beta = ({
className,
-}) => {
+}: {
+ className?: string,
+}): JSX.Element => {
const { t } = useTranslation('common')
return (
diff --git a/src/ui/Button.jsx b/src/ui/Button.tsx
similarity index 86%
rename from src/ui/Button.jsx
rename to src/ui/Button.tsx
index 6d33fff35..a8c899faa 100644
--- a/src/ui/Button.jsx
+++ b/src/ui/Button.tsx
@@ -9,7 +9,26 @@ import './ButtonChristmas.css'
const Button = ({
text, children, primary, secondary, danger, onClick, white, small, regular, large, giant, type, className, loading, semiSmall, semiDanger, noBorder, focus,
-}) => {
+}: {
+ text?: string,
+ children?: JSX.Element,
+ primary?: boolean,
+ secondary?: boolean,
+ danger?: boolean,
+ onClick?: () => void,
+ white?: boolean,
+ small?: boolean,
+ regular?: boolean,
+ large?: boolean,
+ giant?: boolean,
+ type?: 'button' | 'submit' | 'reset',
+ className?: string,
+ loading?: boolean,
+ semiSmall?: boolean,
+ semiDanger?: boolean,
+ focus?: boolean,
+ noBorder?: boolean,
+}): JSX.Element => {
// const themeType = useSelector((state) => state.ui.theme.type)
return (
@@ -77,6 +96,7 @@ Button.propTypes = {
className: PropTypes.string,
loading: PropTypes.bool,
focus: PropTypes.bool,
+ noBorder: PropTypes.bool,
}
Button.defaultProps = {
@@ -97,6 +117,7 @@ Button.defaultProps = {
className: '',
children: null,
focus: true,
+ noBorder: false,
}
export default memo(Button)
diff --git a/src/ui/Chart.jsx b/src/ui/Chart.tsx
similarity index 82%
rename from src/ui/Chart.jsx
rename to src/ui/Chart.tsx
index 9643d4f81..1435cbd56 100644
--- a/src/ui/Chart.jsx
+++ b/src/ui/Chart.tsx
@@ -3,8 +3,12 @@ import bb from 'billboard.js'
import 'billboard.js/dist/theme/datalab.css'
import 'billboard.js/dist/billboard.css'
-const Chart = ({ current, children, options }) => {
- let chartInstance = {}
+const Chart = ({ current, children, options }: {
+ current: string,
+ children: React.ReactNode,
+ options: any,
+}): JSX.Element => {
+ let chartInstance: any = {}
const destroy = () => {
if (chartInstance !== null) {
diff --git a/src/ui/Checkbox.jsx b/src/ui/Checkbox.tsx
similarity index 86%
rename from src/ui/Checkbox.jsx
rename to src/ui/Checkbox.tsx
index 64c5fb248..9d16885e3 100644
--- a/src/ui/Checkbox.jsx
+++ b/src/ui/Checkbox.tsx
@@ -4,7 +4,17 @@ import PropTypes from 'prop-types'
const Checkbox = ({
label, hint, id, name, className, onChange, checked, hintClassName, disabled,
-}) => {
+}: {
+ label: string | JSX.Element,
+ hint?: string | JSX.Element,
+ id?: string,
+ name?: string,
+ className?: string,
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void,
+ checked?: boolean,
+ hintClassName?: string,
+ disabled?: boolean,
+}): JSX.Element => {
const identifier = id || name
return (
diff --git a/src/ui/Code.jsx b/src/ui/Code.tsx
similarity index 79%
rename from src/ui/Code.jsx
rename to src/ui/Code.tsx
index 0936355d6..d4d322a3e 100644
--- a/src/ui/Code.jsx
+++ b/src/ui/Code.tsx
@@ -2,7 +2,11 @@ import React, { memo } from 'react'
import PropTypes from 'prop-types'
import cx from 'clsx'
-const Code = ({ text, className, language }) => (
+const Code = ({ text, className, language }: {
+ text: string | number | React.ReactNode,
+ className?: string,
+ language: string,
+}) => (
<pre className={cx('w-full rounded-md bg-gray-800 dark:bg-gray-750', className)}>
<code className={`whitespace-pre-wrap language-${language}`}>{text}</code>
</pre>
diff --git a/src/ui/Dropdown.jsx b/src/ui/Dropdown.tsx
similarity index 88%
rename from src/ui/Dropdown.jsx
rename to src/ui/Dropdown.tsx
index 85b9d0736..a8e9423e4 100644
--- a/src/ui/Dropdown.jsx
+++ b/src/ui/Dropdown.tsx
@@ -8,7 +8,18 @@ import PropTypes from 'prop-types'
const Dropdown = ({
title, desc, className, items, labelExtractor, keyExtractor, onSelect, aside, buttonClassName, selectItemClassName,
-}) => (
+}: {
+ title: string | number | React.ReactNode,
+ desc?: string | number | React.ReactNode,
+ className?: string,
+ items: any[],
+ labelExtractor: (item: any) => string | number | React.ReactNode,
+ keyExtractor: (item: any) => string | number | React.ReactNode,
+ onSelect: (item: any) => void,
+ aside?: boolean,
+ buttonClassName?: string,
+ selectItemClassName?: string,
+}): JSX.Element => (
<Menu as='div' className={cx('relative inline-block text-left', className)}>
{({ open }) => (
<>
@@ -44,6 +55,7 @@ const Dropdown = ({
<span
className={selectItemClassName || 'text-gray-700 dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 block px-4 py-2 text-sm cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-600'}
role='menuitem'
+ // @ts-ignore
tabIndex='-1'
id='menu-item-0'
onClick={() => onSelect(item)}
diff --git a/src/ui/Flatpicker.jsx b/src/ui/Flatpicker.tsx
similarity index 72%
rename from src/ui/Flatpicker.jsx
rename to src/ui/Flatpicker.tsx
index a6c7340c5..359682678 100644
--- a/src/ui/Flatpicker.jsx
+++ b/src/ui/Flatpicker.tsx
@@ -1,5 +1,5 @@
/* eslint-disable react/no-unused-class-component-methods, class-methods-use-this */
-import React, { memo } from 'react'
+import React, { memo, createRef } from 'react'
import Flatpickr from 'react-flatpickr'
import _size from 'lodash/size'
import PropTypes from 'prop-types'
@@ -9,33 +9,42 @@ import { MAX_MONTHS_IN_PAST } from 'redux/constants'
import './Flatpicker.css'
if (getItem('colour-theme') === 'light') {
+ // @ts-ignore
import('flatpickr/dist/themes/light.css')
} else {
+ // @ts-ignore
import('flatpickr/dist/themes/dark.css')
}
-class FlatPicker extends React.Component {
- constructor(props) {
+interface FlatPickerProps {
+ onChange?: (dates: Date[]) => void,
+ value?: Date[],
+ maxDateMonths?: number,
+}
+
+class FlatPicker extends React.Component<FlatPickerProps> {
+ private calendar = createRef<Flatpickr>()
+
+ constructor(props: FlatPickerProps) {
super(props)
this.setCustomDate = this.setCustomDate.bind(this)
- this.calendar = React.createRef(null)
}
- setCustomDate(dates) {
+ private setCustomDate(dates: Date[]) {
const { onChange } = this.props
if (_size(dates) === 2) {
- onChange(dates)
+ onChange?.(dates)
}
}
- openCalendar = () => {
- if (this.calendar) {
+ private openCalendar = () => {
+ if (this.calendar.current) {
this.calendar.current.flatpickr.open()
}
}
- removeMonths(date, months) {
+ private removeMonths(date: Date, months: number) {
const d = date.getDate()
date.setMonth(date.getMonth() - months)
if (date.getDate() !== d) {
@@ -44,8 +53,8 @@ class FlatPicker extends React.Component {
return date
}
- render() {
- const { value, maxDateMonths } = this.props
+ public render() {
+ const { value = [], maxDateMonths = MAX_MONTHS_IN_PAST } = this.props
return (
<div className='h-0 flatpicker-custom'>
@@ -72,12 +81,14 @@ class FlatPicker extends React.Component {
}
}
+// @ts-ignore
FlatPicker.propTypes = {
onChange: PropTypes.func,
value: PropTypes.arrayOf(PropTypes.instanceOf(Date)),
maxDateMonths: PropTypes.number,
}
+// @ts-ignore
FlatPicker.defaultProps = {
onChange: () => { },
value: [],
diff --git a/src/ui/Input.jsx b/src/ui/Input.tsx
similarity index 87%
rename from src/ui/Input.jsx
rename to src/ui/Input.tsx
index c7a2d8810..9f72a622f 100644
--- a/src/ui/Input.jsx
+++ b/src/ui/Input.tsx
@@ -7,7 +7,21 @@ import Beta from 'ui/Beta'
const Input = ({
label, hint, placeholder, type, id, name, className, onChange, error, value, disabled, onKeyDown, isBeta,
-}) => {
+}: {
+ label: string | JSX.Element,
+ hint?: string | JSX.Element,
+ placeholder?: string,
+ type?: string,
+ id?: string,
+ name?: string,
+ className?: string,
+ onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void,
+ error?: string | null,
+ value?: string | number,
+ disabled?: boolean,
+ onKeyDown?: (e: React.KeyboardEvent<HTMLInputElement>) => void,
+ isBeta?: boolean,
+}): JSX.Element => {
const identifier = id || name || type
const isError = !_isEmpty(error)
diff --git a/src/ui/Loader.jsx b/src/ui/Loader.tsx
similarity index 100%
rename from src/ui/Loader.jsx
rename to src/ui/Loader.tsx
diff --git a/src/ui/Modal.jsx b/src/ui/Modal.tsx
similarity index 94%
rename from src/ui/Modal.jsx
rename to src/ui/Modal.tsx
index c03730f2b..7b0b54af9 100644
--- a/src/ui/Modal.jsx
+++ b/src/ui/Modal.tsx
@@ -9,7 +9,21 @@ import Beta from 'ui/Beta'
const Modal = ({
className, type, title, message, isOpened, onClose, onSubmit, closeText, submitText, submitType, size, customButtons, isBeta,
-}) => (
+}: {
+ className?: string,
+ type: 'error' | 'success' | 'info' | 'warning' | 'confirmed',
+ title: string,
+ message: React.ReactNode | string,
+ isOpened: boolean,
+ onClose: () => void,
+ onSubmit?: () => void,
+ closeText?: string,
+ submitText?: string,
+ submitType?: 'regular' | 'danger',
+ size?: 'regular' | 'large',
+ customButtons?: JSX.Element,
+ isBeta?: boolean,
+}): JSX.Element => (
<Transition.Root show={isOpened} as={Fragment}>
<Dialog
as='div'
diff --git a/src/ui/Pagination.jsx b/src/ui/Pagination.tsx
similarity index 96%
rename from src/ui/Pagination.jsx
rename to src/ui/Pagination.tsx
index c1c5f57e7..9bd7a674b 100644
--- a/src/ui/Pagination.jsx
+++ b/src/ui/Pagination.tsx
@@ -8,7 +8,12 @@ import { usePagination, DOTS } from 'hooks/usePagination'
const Pagination = ({
page, setPage, pageAmount, total,
-}) => {
+}: {
+ page: number,
+ setPage: (item: number) => void,
+ pageAmount: number,
+ total: number,
+}): JSX.Element => {
const { t } = useTranslation('common')
const paginationRange = usePagination(total, page)
diff --git a/src/ui/Pin.jsx b/src/ui/Pin.tsx
similarity index 76%
rename from src/ui/Pin.jsx
rename to src/ui/Pin.tsx
index 8cb229ccc..1bbf1088f 100644
--- a/src/ui/Pin.jsx
+++ b/src/ui/Pin.tsx
@@ -11,19 +11,28 @@ const defaultProps = {
className: '',
}
-const ActivePin = ({ label, className }) => (
+const ActivePin = ({ label, className }: {
+ label: string,
+ className?: string,
+}): JSX.Element => (
<p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-green-100 text-green-800 dark:bg-emerald-400 dark:text-green-900', className)}>
{label}
</p>
)
-const InactivePin = ({ label, className }) => (
+const InactivePin = ({ label, className }: {
+ label: string,
+ className?: string,
+}): JSX.Element => (
<p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-red-100 text-red-800 dark:bg-red-300 dark:text-red-900', className)}>
{label}
</p>
)
-const WarningPin = ({ label, className }) => (
+const WarningPin = ({ label, className }: {
+ label: string,
+ className?: string,
+}): JSX.Element => (
<p className={cx('px-2 inline-flex text-sm leading-5 font-normal rounded-full bg-yellow-200 text-yellow-800 dark:bg-yellow-300 dark:text-yellow-900', className)}>
{label}
</p>
diff --git a/src/ui/Progress.jsx b/src/ui/Progress.tsx
similarity index 87%
rename from src/ui/Progress.jsx
rename to src/ui/Progress.tsx
index 19d7c1c94..7fd580f05 100644
--- a/src/ui/Progress.jsx
+++ b/src/ui/Progress.tsx
@@ -1,7 +1,9 @@
import React, { memo } from 'react'
import PropTypes from 'prop-types'
-const Progress = ({ now }) => (
+const Progress = ({ now }: {
+ now: number,
+}): JSX.Element => (
<div className='relative'>
<div className='overflow-hidden h-2 text-xs flex rounded bg-blue-200 dark:bg-gray-500'>
<div style={{ width: `${now}%` }} className='shadow-none flex flex-col text-center whitespace-nowrap text-white justify-center bg-blue-500 dark:bg-blue-700' />
diff --git a/src/ui/Select.jsx b/src/ui/Select.tsx
similarity index 92%
rename from src/ui/Select.jsx
rename to src/ui/Select.tsx
index b65a6cc50..9679c777a 100644
--- a/src/ui/Select.jsx
+++ b/src/ui/Select.tsx
@@ -7,7 +7,17 @@ import _map from 'lodash/map'
const Select = ({
title, label, className, items, labelExtractor, keyExtractor, iconExtractor, onSelect,
-}) => (
+}: {
+ title: string,
+ label: string,
+ className?: string,
+ items: any[],
+ labelExtractor?: (item: any, index: number) => string,
+ keyExtractor?: (item: any, index: number) => string,
+ iconExtractor?: (item: any, index: number) => JSX.Element,
+ onSelect: (item: any) => void,
+}): JSX.Element => (
+ // @ts-ignore
<Listbox className={className} value={title} onChange={onSelect}>
{({ open }) => (
<>
diff --git a/src/ui/TimezonePicker.jsx b/src/ui/TimezonePicker.tsx
similarity index 80%
rename from src/ui/TimezonePicker.jsx
rename to src/ui/TimezonePicker.tsx
index cd7e992f8..a3e0fda79 100644
--- a/src/ui/TimezonePicker.jsx
+++ b/src/ui/TimezonePicker.tsx
@@ -12,7 +12,7 @@ import Select from './Select'
const options = _reduce(
Object.entries(allTimezones),
- (selectOptions, zone) => {
+ (selectOptions: any[], zone) => {
const now = spacetime.now(zone[0])
const tz = now.timezone()
const tzStrings = soft(zone[0])
@@ -41,18 +41,33 @@ const options = _reduce(
const TimezoneSelect = ({
value, onChange,
-}) => {
- const { t } = useTranslation('common')
- const labelExtractor = (option) => option?.label
- const keyExtractor = (option) => option?.value
-
- const handleChange = (label) => {
+}: {
+ value: string | {
+ value: string,
+ label: string,
+ },
+ onChange: (item: string) => void,
+}): JSX.Element => {
+ const { t }: {
+ t: (key: string) => string,
+ } = useTranslation('common')
+ const labelExtractor = (option: {
+ label: string,
+ }) => option?.label
+ const keyExtractor = (option: {
+ value: string,
+ }) => option?.value
+
+ const handleChange = (label: string) => {
const tz = _find(options, timezone => labelExtractor(timezone) === label)
const key = keyExtractor(tz)
onChange(key)
}
- const parseTimezone = (zone) => {
+ const parseTimezone = (zone: string | {
+ value: string,
+ label: string,
+ }) => {
if (typeof zone === 'object' && zone.value && zone.label) {
return zone
}
diff --git a/src/ui/Tooltip.jsx b/src/ui/Tooltip.tsx
similarity index 89%
rename from src/ui/Tooltip.jsx
rename to src/ui/Tooltip.tsx
index e9b7a3e5d..7cd5278c4 100644
--- a/src/ui/Tooltip.jsx
+++ b/src/ui/Tooltip.tsx
@@ -5,7 +5,11 @@ import cx from 'clsx'
const Tooltip = ({
text, className, tooltipNode,
-}) => (
+}: {
+ text: string | number | React.ReactNode,
+ className?: string,
+ tooltipNode?: JSX.Element,
+}): JSX.Element => (
<div className={cx('w-5 h-5 relative flex flex-col group items-center', className)}>
{tooltipNode || (
<QuestionMarkCircleIcon className='w-5 h-5 text-gray-700 dark:text-gray-300' />
diff --git a/src/ui/icons/Angular.tsx b/src/ui/icons/Angular.tsx
index a63fb3a0e..e9965e8b4 100644
--- a/src/ui/icons/Angular.tsx
+++ b/src/ui/icons/Angular.tsx
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
const Angular = ({ className }: {
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={className}
x='0px'
diff --git a/src/ui/icons/BackgroundSvg.tsx b/src/ui/icons/BackgroundSvg.tsx
index 4bb20b158..15274797d 100644
--- a/src/ui/icons/BackgroundSvg.tsx
+++ b/src/ui/icons/BackgroundSvg.tsx
@@ -6,8 +6,8 @@ import { getItem } from 'utils/localstorage'
const BackgroundSvg = ({ className, type, children }: {
className?: string,
type: 'shapes' | 'circle' | 'semicircle' | 'twolinecircle' | 'threecircle' | 'twolinecircle2',
- children?: React.ReactNode,
-}): React.ReactNode => {
+ children?: JSX.Element,
+}): JSX.Element => {
const theme = getItem('colour-theme') || 'light'
if (type === 'shapes') {
diff --git a/src/ui/icons/Cloudflare.tsx b/src/ui/icons/Cloudflare.tsx
index 5c330f23e..2c574e4f1 100644
--- a/src/ui/icons/Cloudflare.tsx
+++ b/src/ui/icons/Cloudflare.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Cloudflare = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => {
+}): JSX.Element => {
const cn = cx(className, {
'fill-white': theme === 'dark',
'fill-slate-800': theme === 'light',
diff --git a/src/ui/icons/Gatsby.tsx b/src/ui/icons/Gatsby.tsx
index 1834659a9..998280a0f 100644
--- a/src/ui/icons/Gatsby.tsx
+++ b/src/ui/icons/Gatsby.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Gatsby = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={cx(className, {
'fill-white': theme === 'dark',
diff --git a/src/ui/icons/Ghost.tsx b/src/ui/icons/Ghost.tsx
index ce56edfcc..bdd5a0bbb 100644
--- a/src/ui/icons/Ghost.tsx
+++ b/src/ui/icons/Ghost.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Ghost = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => {
+}): JSX.Element => {
const cn = cx(className, {
'fill-white': theme === 'dark',
'fill-slate-800': theme === 'light',
diff --git a/src/ui/icons/NextJS.tsx b/src/ui/icons/NextJS.tsx
index 6164a67d3..81dfcb433 100644
--- a/src/ui/icons/NextJS.tsx
+++ b/src/ui/icons/NextJS.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const NextJS = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={cx(className, {
'fill-white': theme === 'dark',
diff --git a/src/ui/icons/Notion.tsx b/src/ui/icons/Notion.tsx
index 28f0dc8d1..7307e0b32 100644
--- a/src/ui/icons/Notion.tsx
+++ b/src/ui/icons/Notion.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Notion = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => {
+}): JSX.Element => {
const cn = cx(className, {
'fill-white': theme === 'dark',
'fill-slate-800': theme === 'light',
diff --git a/src/ui/icons/NuxtJS.tsx b/src/ui/icons/NuxtJS.tsx
index 237b1f2ec..0029db17e 100644
--- a/src/ui/icons/NuxtJS.tsx
+++ b/src/ui/icons/NuxtJS.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const NuxtJS = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => {
+}): JSX.Element => {
const cn = cx({
'fill-white': theme === 'dark',
'fill-slate-800': theme === 'light',
diff --git a/src/ui/icons/PulsatingCircle.tsx b/src/ui/icons/PulsatingCircle.tsx
index 35ba6f435..85ada8fbb 100644
--- a/src/ui/icons/PulsatingCircle.tsx
+++ b/src/ui/icons/PulsatingCircle.tsx
@@ -16,7 +16,7 @@ const types = {
const PulsatingCircle = ({ className, type }: {
className?: string,
type: 'small' | 'big',
-}): React.ReactNode => (
+}): JSX.Element => (
<span className={cx('flex justify-center items-center', types[type]?.pulse, className)}>
<span className={cx('animate-ping-slow absolute inline-flex rounded-full bg-green-400', types[type]?.pulse)} />
<span className={cx('relative inline-flex rounded-full bg-green-500', types[type]?.base)} />
diff --git a/src/ui/icons/Quote.tsx b/src/ui/icons/Quote.tsx
index d3835387b..8818ce119 100644
--- a/src/ui/icons/Quote.tsx
+++ b/src/ui/icons/Quote.tsx
@@ -6,7 +6,7 @@ const Quote = ({ theme, className, color }: {
theme: 'light' | 'dark',
className?: string,
color: 'black' | 'indigo',
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={cx(className, {
'fill-[#232536]': color === 'black' && theme === 'light',
diff --git a/src/ui/icons/ReactSVG.tsx b/src/ui/icons/ReactSVG.tsx
index bd4e4ce0e..872a3d381 100644
--- a/src/ui/icons/ReactSVG.tsx
+++ b/src/ui/icons/ReactSVG.tsx
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
const ReactSVG = ({ className }: {
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg className={className} viewBox='175.7 78 490.6 436.9'>
<title>
React.js
diff --git a/src/ui/icons/Robot.tsx b/src/ui/icons/Robot.tsx
index 908b84d62..7c0621795 100644
--- a/src/ui/icons/Robot.tsx
+++ b/src/ui/icons/Robot.tsx
@@ -7,7 +7,7 @@ const Robot = ({
}: {
className?: string,
containerClassName?: string,
-}): React.ReactNode => {
+}): JSX.Element => {
const cn = cx(className, {
// 'fill-white': theme === 'dark',
// 'fill-slate-800': theme === 'light',
diff --git a/src/ui/icons/Spin.tsx b/src/ui/icons/Spin.tsx
index 1e95455ba..e6bb892cd 100644
--- a/src/ui/icons/Spin.tsx
+++ b/src/ui/icons/Spin.tsx
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
const Spin = ({ className }: {
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg className={cx('animate-spin -ml-1 mr-2 h-4 w-4 text-white', className)} xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'>
<circle className='opacity-25' cx='12' cy='12' r='10' stroke='currentColor' strokeWidth='4' />
<path className='opacity-75' fill='currentColor' d='M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z' />
diff --git a/src/ui/icons/Telegram.tsx b/src/ui/icons/Telegram.tsx
index 048dffdc1..dd47de2ec 100644
--- a/src/ui/icons/Telegram.tsx
+++ b/src/ui/icons/Telegram.tsx
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
const Telegram = ({ className }: {
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg className={className} viewBox='0 0 1000 1000'>
<title>
Telegram
diff --git a/src/ui/icons/Webflow.tsx b/src/ui/icons/Webflow.tsx
index b5c4d81ee..2c4c56cb6 100644
--- a/src/ui/icons/Webflow.tsx
+++ b/src/ui/icons/Webflow.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Webflow = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={className}
x='0px'
diff --git a/src/ui/icons/Wix.tsx b/src/ui/icons/Wix.tsx
index a4707add5..a11689a67 100644
--- a/src/ui/icons/Wix.tsx
+++ b/src/ui/icons/Wix.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Wix = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={cx(className, {
'fill-white': theme === 'dark',
diff --git a/src/ui/icons/Wordpress.tsx b/src/ui/icons/Wordpress.tsx
index 8ad50a7da..a237c7828 100644
--- a/src/ui/icons/Wordpress.tsx
+++ b/src/ui/icons/Wordpress.tsx
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
const Wordpress = ({ theme, className }: {
theme: 'dark' | 'light',
className?: string,
-}): React.ReactNode => (
+}): JSX.Element => (
<svg
className={cx(className, {
'fill-white': theme === 'dark',