Skip to content

Commit 7b27b6d

Browse files
committed
fix crash, fix select
1 parent 49a4df6 commit 7b27b6d

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

components/Input/Select.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ import {
1010
filter,
1111
find,
1212
isNil,
13+
some,
1314
isEmpty as lodashEmpty,
1415
includes,
1516
} from 'lodash'
1617
import classNames from 'classnames'
18+
import useDebounce from '~hooks/useDebounce'
1719
import { FiX as CloseIcon } from 'react-icons/fi'
1820
import { BaseButton, Loader } from '~components'
1921
import useOutsideClick from '~hooks/useOutsideClick'
@@ -73,7 +75,13 @@ const Content = React.memo(
7375
className={styles.searchInput}
7476
onChange={(e) => setSearchValue(e.target.value)}
7577
onBlur={() => {
76-
if (value === '') {
78+
if (
79+
value === '' ||
80+
some(
81+
map(options, (option) => option.label),
82+
(label) => label !== searchValue
83+
)
84+
) {
7785
setSearchValue('')
7886
}
7987
}}

components/User/Avatar.module.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
display: flex;
55
flex-direction: column;
66
.user {
7-
display: flex;
7+
display: grid;
8+
grid-template-columns: 34px 1fr;
9+
grid-gap: spacing(1);
810
align-items: center;
911
img {
1012
width: 44px;
@@ -14,7 +16,7 @@
1416
}
1517
}
1618
a {
17-
margin-left: spacing(1);
19+
// margin-left: spacing(1);
1820
color: $color-primary;
1921
font-size: $font-size-p;
2022
font-family: $font-family-secondary;
@@ -27,3 +29,7 @@
2729
margin-bottom: spacing(0.5);
2830
}
2931
}
32+
33+
.link {
34+
color: $color-complimentary;
35+
}

pages/messages/components/ChatList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { BaseButton, Loader, Button } from '../../../components'
1414
import { getUsername } from '../../../utils/helpers'
1515
import styles from './ChatList.module.scss'
1616
import ChatAvatar from './ChatAvatar'
17-
import { getMessage } from './chatUtils'
17+
import { getMessage } from '../../../utils/chatUtils'
1818

1919
type Props = {
2020
onPaginate: () => void

pages/messages/components/MessagesList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import map from 'lodash/map'
66
import { scrollToBottom } from '../../../utils/helpers'
77
import styles from './MessagesList.module.scss'
88
import useUser from '../../../hooks/useUser'
9-
import { getMessage } from './chatUtils'
9+
import { getMessage } from '../../../utils/chatUtils'
1010

1111
type Props = {
1212
messages: any
File renamed without changes.

0 commit comments

Comments
 (0)