Skip to content

Commit bec49d5

Browse files
committed
#RI-6554 - fix pr comments, fix icons color
1 parent 0ea7cba commit bec49d5

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed
Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 1 addition & 1 deletion
Loading

redisinsight/ui/src/pages/home/components/add-database-screen/AddDatabaseScreen.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
import { Pages } from 'uiSrc/constants'
2424
import ConnectivityOptions from './components/connectivity-options'
2525
import ConnectionUrl from './components/connection-url'
26+
import { Values } from './constants'
2627

2728
import styles from './styles.module.scss'
2829

@@ -63,9 +64,9 @@ const AddDatabaseScreen = (props: Props) => {
6364
const dispatch = useDispatch()
6465
const history = useHistory()
6566

66-
const validate = (values: any) => {
67+
const validate = (values: Values) => {
6768
const payload = getPayload(values.connectionURL, true)
68-
setIsInvalid(!payload && values.connectionURL)
69+
setIsInvalid(!payload && !!values.connectionURL)
6970
}
7071

7172
const handleTestConnection = () => {
@@ -87,7 +88,7 @@ const AddDatabaseScreen = (props: Props) => {
8788
}))
8889
}
8990

90-
const formik = useFormik({
91+
const formik = useFormik<Values>({
9192
initialValues: {
9293
connectionURL: 'redis://[email protected]:6379'
9394
},

redisinsight/ui/src/pages/home/components/add-database-screen/components/connectivity-options/ConnectivityOptions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const ConnectivityOptions = (props: Props) => {
4848
{(ssoCloudHandlerClick, isSSOEnabled) => (
4949
<EuiButton
5050
color="secondary"
51-
className={cx(styles.typeBtn, styles.primary)}
51+
className={styles.typeBtn}
5252
href={getUtmExternalLink(EXTERNAL_LINKS.tryFree, {
5353
campaign: UTM_CAMPAINGS[OAuthSocialSource.AddDbForm]
5454
})}

redisinsight/ui/src/pages/home/components/add-database-screen/constants.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import ShieldIcon from 'uiSrc/assets/img/shield.svg?react'
66
import RedisSoftwareIcon from 'uiSrc/assets/img/redis-software.svg?react'
77

88
export interface Values {
9-
connectionURL?: string
9+
connectionURL: string
1010
}
1111

1212
export const CONNECTIVITY_OPTIONS = [

0 commit comments

Comments
 (0)