Numerious fixes.
This commit is contained in:
parent
619df83ddd
commit
90204e4f10
@ -235,7 +235,7 @@ const DashboardNavigation = () => {
|
||||
<Button
|
||||
icon={<SearchIcon />}
|
||||
type='text'
|
||||
style={{ marginTop: '2px' }}
|
||||
style={{ marginTop: '4px' }}
|
||||
onClick={() => showSpotlight()}
|
||||
/>
|
||||
</KeyboardShortcut>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { useMemo, useEffect, useRef, useState } from 'react'
|
||||
import { useMemo, useEffect, useRef, useState, useCallback } from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
import { Table, Skeleton, Card, Button, Flex, Typography, Modal } from 'antd'
|
||||
import PlusIcon from '../../Icons/PlusIcon'
|
||||
@ -91,7 +91,8 @@ const ObjectChildTable = ({
|
||||
return generated
|
||||
}
|
||||
|
||||
const getResolvedRecordKey = (record) => {
|
||||
const getResolvedRecordKey = useCallback(
|
||||
(record) => {
|
||||
if (typeof rowKey === 'function') {
|
||||
return rowKey(record) ?? getFallbackRowKey(record)
|
||||
}
|
||||
@ -101,7 +102,9 @@ const ObjectChildTable = ({
|
||||
}
|
||||
|
||||
return getFallbackRowKey(record)
|
||||
}
|
||||
},
|
||||
[rowKey]
|
||||
)
|
||||
|
||||
const propertyMap = useMemo(() => {
|
||||
const map = new Map()
|
||||
@ -258,7 +261,8 @@ const ObjectChildTable = ({
|
||||
canAddRemove,
|
||||
itemsSource,
|
||||
onChange,
|
||||
rowKey
|
||||
rowKey,
|
||||
getResolvedRecordKey
|
||||
])
|
||||
|
||||
const skeletonData = useMemo(() => {
|
||||
|
||||
@ -49,7 +49,7 @@ const WebAppSwitcher = () => {
|
||||
<Button
|
||||
icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />}
|
||||
type='text'
|
||||
style={{ marginTop: '2px' }}
|
||||
style={{ marginTop: '4px' }}
|
||||
onClick={handleClick}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
@ -291,9 +291,6 @@ const AuthProvider = ({ children }) => {
|
||||
})
|
||||
}, [authenticated, token, expiresAt, userProfile, persistSession])
|
||||
|
||||
const profileImageDependency =
|
||||
userProfile?.profileImage?._id ?? userProfile?.profileImage
|
||||
|
||||
// Fetch and cache profile image when userProfile.profileImage changes
|
||||
useEffect(() => {
|
||||
const profileImage = userProfile?.profileImage
|
||||
@ -368,7 +365,7 @@ const AuthProvider = ({ children }) => {
|
||||
}
|
||||
setProfileImageUrl(null)
|
||||
}
|
||||
}, [profileImageDependency, token])
|
||||
}, [userProfile?.profileImage, token])
|
||||
|
||||
useEffect(() => {
|
||||
console.log('userProfile', userProfile)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user