messages: fixes mystery hamburger bouncing
@@ -122,10 +122,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement {
);
const ExtraControls = () => {
- if (workspace === '/messages') {
- const resourceArr = association.resource.split('/');
- const resourceName = resourceArr[resourceArr.length - 1];
- if (!resourceName.startsWith('dm-')) {
+ if (workspace === '/messages' && !resource.startsWith('dm-')) {
return (
<Dropdown
flexShrink={0}
@@ -152,7 +149,6 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement {
</Dropdown>
);
}
- }
if (canWrite) {
return (
<Link to={resourcePath('/new')}>
@@ -173,7 +169,7 @@ export function ResourceSkeleton(props: ResourceSkeletonProps): ReactElement {
const actionsRef = useCallback((actionsRef) => {
setActionsWidth(actionsRef?.getBoundingClientRect().width);
- }, []);
+ }, [rid]);
return (
<Col width='100%' height='100%' overflow='hidden'>
