mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(board status): resolve offline indicators with strict community refs
This commit is contained in:
@@ -67,6 +67,10 @@ vi.mock('@bitsocialnet/bitsocial-react-hooks', () => ({
|
||||
setAccount: (account: unknown) => testState.setAccountMock(account),
|
||||
useAccount: () => testState.account,
|
||||
useAccountComment: () => testState.accountComment,
|
||||
useCommunity: (options?: { community?: { name?: string; publicKey?: string } }) => {
|
||||
const communityKey = options?.community?.name ?? options?.community?.publicKey;
|
||||
return communityKey ? testState.communities[communityKey] : undefined;
|
||||
},
|
||||
useEditedComment: () => ({ editedComment: testState.editedComment }),
|
||||
}));
|
||||
|
||||
@@ -88,6 +92,10 @@ vi.mock('../../../hooks/use-directories', () => ({
|
||||
normalizeBoardAddress: (address: string) => address.replace(/\.(bso|eth)$/, ''),
|
||||
}));
|
||||
|
||||
vi.mock('../../../hooks/use-community-identifiers', () => ({
|
||||
useCommunityIdentifier: (address?: string) => (address ? { name: address } : undefined),
|
||||
}));
|
||||
|
||||
vi.mock('../../../hooks/use-resolved-community-address', () => ({
|
||||
useResolvedCommunityAddress: () => testState.resolvedCommunityAddress,
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user