Numerious fixes.

This commit is contained in:
Tom Butcher 2026-06-21 20:19:22 +01:00
parent 619df83ddd
commit 90204e4f10
4 changed files with 18 additions and 17 deletions

View File

@ -235,7 +235,7 @@ const DashboardNavigation = () => {
<Button <Button
icon={<SearchIcon />} icon={<SearchIcon />}
type='text' type='text'
style={{ marginTop: '2px' }} style={{ marginTop: '4px' }}
onClick={() => showSpotlight()} onClick={() => showSpotlight()}
/> />
</KeyboardShortcut> </KeyboardShortcut>

View File

@ -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 PropTypes from 'prop-types'
import { Table, Skeleton, Card, Button, Flex, Typography, Modal } from 'antd' import { Table, Skeleton, Card, Button, Flex, Typography, Modal } from 'antd'
import PlusIcon from '../../Icons/PlusIcon' import PlusIcon from '../../Icons/PlusIcon'
@ -91,7 +91,8 @@ const ObjectChildTable = ({
return generated return generated
} }
const getResolvedRecordKey = (record) => { const getResolvedRecordKey = useCallback(
(record) => {
if (typeof rowKey === 'function') { if (typeof rowKey === 'function') {
return rowKey(record) ?? getFallbackRowKey(record) return rowKey(record) ?? getFallbackRowKey(record)
} }
@ -101,7 +102,9 @@ const ObjectChildTable = ({
} }
return getFallbackRowKey(record) return getFallbackRowKey(record)
} },
[rowKey]
)
const propertyMap = useMemo(() => { const propertyMap = useMemo(() => {
const map = new Map() const map = new Map()
@ -258,7 +261,8 @@ const ObjectChildTable = ({
canAddRemove, canAddRemove,
itemsSource, itemsSource,
onChange, onChange,
rowKey rowKey,
getResolvedRecordKey
]) ])
const skeletonData = useMemo(() => { const skeletonData = useMemo(() => {

View File

@ -49,7 +49,7 @@ const WebAppSwitcher = () => {
<Button <Button
icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />} icon={isElectron ? <OpenInBrowserIcon /> : <OpenInAppIcon />}
type='text' type='text'
style={{ marginTop: '2px' }} style={{ marginTop: '4px' }}
onClick={handleClick} onClick={handleClick}
/> />
</Tooltip> </Tooltip>

View File

@ -291,9 +291,6 @@ const AuthProvider = ({ children }) => {
}) })
}, [authenticated, token, expiresAt, userProfile, persistSession]) }, [authenticated, token, expiresAt, userProfile, persistSession])
const profileImageDependency =
userProfile?.profileImage?._id ?? userProfile?.profileImage
// Fetch and cache profile image when userProfile.profileImage changes // Fetch and cache profile image when userProfile.profileImage changes
useEffect(() => { useEffect(() => {
const profileImage = userProfile?.profileImage const profileImage = userProfile?.profileImage
@ -368,7 +365,7 @@ const AuthProvider = ({ children }) => {
} }
setProfileImageUrl(null) setProfileImageUrl(null)
} }
}, [profileImageDependency, token]) }, [userProfile?.profileImage, token])
useEffect(() => { useEffect(() => {
console.log('userProfile', userProfile) console.log('userProfile', userProfile)