Profile redesign: Show yourself in follower list (#37813)

This commit is contained in:
Echo authored and GitHub committed 2026-02-11 13:19:18 +00:00
1 parent 20fedab093
commit bbd88d356d
13 files changed
+474 -375

No files matched your search

@@ -8,6 +8,7 @@ export const useLayout = () => {
return {
singleColumn: layout === 'single-column' || layout === 'mobile',
multiColumn: layout === 'multi-column',
layout,
};
};
@@ -0,0 +1,19 @@
import { useEffect } from 'react';
import { fetchRelationships } from '../actions/accounts';
import { useAppDispatch, useAppSelector } from '../store';
export function useRelationship(accountId?: string | null) {
const relationship = useAppSelector((state) =>
accountId ? state.relationships.get(accountId) : null,
);
const dispatch = useAppDispatch();
useEffect(() => {
if (accountId && !relationship) {
dispatch(fetchRelationships([accountId]));
}
}, [accountId, dispatch, relationship]);
return relationship;
}