mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Improve React Doctor score and badge (#1127)
* fix(react doctor): improve quality score and badge * fix(react doctor): address review feedback * fix(review): address final bot feedback
This commit is contained in:
@@ -4,7 +4,7 @@ import { findDirectoryByAddress, type DirectoryCommunity, useDirectories } from
|
||||
|
||||
const isLikelyCommunityName = (value: string) => value.includes('.');
|
||||
|
||||
export const getCommunityIdentifier = (communityAddress: string | undefined, directories: DirectoryCommunity[]): CommunityIdentifier | undefined => {
|
||||
const getCommunityIdentifier = (communityAddress: string | undefined, directories: DirectoryCommunity[]): CommunityIdentifier | undefined => {
|
||||
if (!communityAddress) {
|
||||
return undefined;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ export const getCommunityIdentifier = (communityAddress: string | undefined, dir
|
||||
};
|
||||
};
|
||||
|
||||
export const getCommunityIdentifiers = (communityAddresses: Array<string | undefined>, directories: DirectoryCommunity[]): CommunityIdentifier[] =>
|
||||
const getCommunityIdentifiers = (communityAddresses: Array<string | undefined>, directories: DirectoryCommunity[]): CommunityIdentifier[] =>
|
||||
communityAddresses.flatMap((communityAddress) => {
|
||||
const community = getCommunityIdentifier(communityAddress, directories);
|
||||
return community ? [community] : [];
|
||||
|
||||
@@ -8,7 +8,7 @@ interface DirectoriesMetadata {
|
||||
updatedAt: number;
|
||||
}
|
||||
|
||||
export interface DirectoryFeatures {
|
||||
interface DirectoryFeatures {
|
||||
postsPerPage?: number;
|
||||
pseudonymityMode?: string;
|
||||
nsfw?: boolean;
|
||||
|
||||
Reference in New Issue
Block a user