Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 12 additions & 8 deletions src/api/blocklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,12 @@ export function useSingleBlocklist(did) {
/**
* given the did of an account, return the total number of accounts which are being blocked by the given account
* @param {string | undefined} did
* @param {Boolean | undefined} shouldFetchBlockingCount
*/
export function useBlocklistCount(did) {
export function useBlocklistCount(did,shouldFetchBlockingCount) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function useBlocklistCount(did,shouldFetchBlockingCount) {
export function useBlocklistCount(did, shouldFetchBlockingCount) {

Copilot uses AI. Check for mistakes.

const fullDid = unwrapShortDID(did);
return useQuery({
enabled: !!fullDid,
enabled: !!fullDid && shouldFetchBlockingCount,
queryKey: ['blocklist-count', fullDid],
// @ts-expect-error fullDid will be a string because the query will be disabled otherwise
queryFn: () => blocklistCountCall(fullDid, 'blocklist'),
Expand All @@ -87,11 +88,12 @@ export function useBlocklistCount(did) {
/**
* given the did of an account, return the total number of other accounts which are blocking the given account
* @param {string | undefined} did
* @param {Boolean | undefined} shouldFetchBlockedbyCount
*/
export function useSingleBlocklistCount(did) {
export function useSingleBlocklistCount(did,shouldFetchBlockedbyCount) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function useSingleBlocklistCount(did,shouldFetchBlockedbyCount) {
export function useSingleBlocklistCount(did, shouldFetchBlockedbyCount) {

Copilot uses AI. Check for mistakes.

const fullDid = unwrapShortDID(did);
return useQuery({
enabled: !!fullDid,
enabled: !!fullDid && shouldFetchBlockedbyCount,
queryKey: ['single-blocklist-count', fullDid],
// @ts-expect-error fullDid will be a string because the query will be disabled otherwise
queryFn: () => blocklistCountCall(fullDid, 'single-blocklist'),
Expand Down Expand Up @@ -203,12 +205,13 @@ async function getBlockingLists(shortHandle, currentPage = 1) {

/**
* @param {string | undefined} handleOrDID
* @param {Boolean | undefined} shouldFetchlistsBlockingCount
*/
export function useBlockingListsTotal(handleOrDID) {
export function useBlockingListsTotal(handleOrDID,shouldFetchlistsBlockingCount) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function useBlockingListsTotal(handleOrDID,shouldFetchlistsBlockingCount) {
export function useBlockingListsTotal(handleOrDID, shouldFetchlistsBlockingCount) {

Copilot uses AI. Check for mistakes.

const profileQuery = useResolveHandleOrDid(handleOrDID);
const shortHandle = profileQuery.data?.shortHandle;
return useQuery({
enabled: !!shortHandle,
enabled: !!shortHandle && shouldFetchlistsBlockingCount,
queryKey: ['blocking-lists-total', shortHandle],
queryFn: () => getBlockingListsTotal(shortHandle),
});
Expand Down Expand Up @@ -275,12 +278,13 @@ async function getBlockedByLists(shortHandle, currentPage = 1) {

/**
* @param {string | undefined} handleOrDID
* @param {Boolean | undefined} shouldFetchlistsBlockedByCount
*/
export function useBlockedByListsTotal(handleOrDID) {
export function useBlockedByListsTotal(handleOrDID,shouldFetchlistsBlockedByCount) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function useBlockedByListsTotal(handleOrDID,shouldFetchlistsBlockedByCount) {
export function useBlockedByListsTotal(handleOrDID, shouldFetchlistsBlockedByCount) {

Copilot uses AI. Check for mistakes.

const profileQuery = useResolveHandleOrDid(handleOrDID);
const shortHandle = profileQuery.data?.shortHandle;
return useQuery({
enabled: !!shortHandle,
enabled: !!shortHandle && shouldFetchlistsBlockedByCount,
queryKey: ['blocked-by-lists-total', shortHandle],
queryFn: () => getBlockedByListsTotal(shortHandle),
});
Expand Down
5 changes: 3 additions & 2 deletions src/api/handle-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ import { fetchClearskyApi } from './core';
/**
*
* @param {string | undefined} shortDid
* @param {Boolean | undefined} shouldIshandleHistory
*/
export function useHandleHistory(shortDid) {
export function useHandleHistory(shortDid,shouldIshandleHistory) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function useHandleHistory(shortDid,shouldIshandleHistory) {
export function useHandleHistory(shortDid, shouldIshandleHistory) {

Copilot uses AI. Check for mistakes.

return useQuery({
enabled: !!shortDid,
enabled: !!shortDid && shouldIshandleHistory,
queryKey: ['get-handle-history', shortDid],
// @ts-expect-error shortDid will be a string, as query is skipped otherwise
queryFn: () => getHandleHistoryRaw(shortDid, false),
Expand Down
5 changes: 3 additions & 2 deletions src/api/lists.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ export function useList(handleOrDID) {
/**
* Look up the total number of lists to which a given handle/DID belongs
* @param {string | undefined} handleOrDID
* @param {Boolean} shouldFetchListCounts
*/
export function useListCount(handleOrDID) {
export function useListCount(handleOrDID,shouldFetchListCounts) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function useListCount(handleOrDID,shouldFetchListCounts) {
export function useListCount(handleOrDID, shouldFetchListCounts) {

Copilot uses AI. Check for mistakes.

const profileQuery = useResolveHandleOrDid(handleOrDID);
const shortHandle = profileQuery.data?.shortHandle;
return useQuery({
enabled: !!shortHandle,
enabled: !!shortHandle && shouldFetchListCounts,
queryKey: ['list-total', shortHandle],
// @ts-expect-error shortHandle won't really be undefined because the query will be disabled
queryFn: () => getListCount(shortHandle),
Expand Down
21 changes: 12 additions & 9 deletions src/api/packs.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@ export function usePacksCreated(handleOrDID) {

/**
* @param {string | undefined} handleOrDID
* @param {boolean | undefined} shouldFetchstarterPacksMadeCount
*/
export function usePacksCreatedTotal(handleOrDID) {
export function usePacksCreatedTotal(handleOrDID,shouldFetchstarterPacksMadeCount){
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters and extra spaces before opening brace. Format as: (handleOrDID, shouldFetchstarterPacksMadeCount) {

Copilot uses AI. Check for mistakes.

const profileQuery = useResolveHandleOrDid(handleOrDID);
const shortHandle = profileQuery.data?.shortHandle;
return useQuery({
enabled: !!shortHandle,
enabled: !!shortHandle && shouldFetchstarterPacksMadeCount,
queryKey: ['starter-packs-total', shortHandle],
queryFn: () => getPacksCreatedTotal(shortHandle),
});
Expand All @@ -49,16 +50,18 @@ export function usePacksPopulated(handleOrDID) {
}

/**
* @param {string | undefined} handleOrDID
* @param {string | undefined} handleOrDID
* @param {Boolean | undefined} shouldFetchstarterPacksInCount
*/
export function usePacksPopulatedTotal(handleOrDID) {
export function usePacksPopulatedTotal(handleOrDID,shouldFetchstarterPacksInCount){
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space before function keyword, missing space after comma in parameters, and extra spaces before opening brace. Format as: export function usePacksPopulatedTotal(handleOrDID, shouldFetchstarterPacksInCount) {

Suggested change
export function usePacksPopulatedTotal(handleOrDID,shouldFetchstarterPacksInCount){
export function usePacksPopulatedTotal(handleOrDID, shouldFetchstarterPacksInCount) {

Copilot uses AI. Check for mistakes.

const profileQuery = useResolveHandleOrDid(handleOrDID);
const shortHandle = profileQuery.data?.shortHandle;
return useQuery({
enabled: !!shortHandle,
queryKey: ['starter-pack-total', shortHandle],
queryFn: () => getPacksPopulatedTotal(shortHandle),
});
return useQuery({
enabled: !!shortHandle && shouldFetchstarterPacksInCount,
queryKey: ['starter-pack-total', shortHandle],
// @ts-expect-error shortHandle won't really be undefined because the query will be disabled
queryFn: () => getPacksPopulatedTotal(shortHandle),
});
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/api/placement.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import { useQuery } from '@tanstack/react-query';

/**
* @param {string | undefined} handleOrDID
* @param {Boolean | undefined} shoulduserPlacement
*/
export function usePlacement(handleOrDID) {
export function usePlacement(handleOrDID,shoulduserPlacement) {
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function parameters. Add space after comma for consistency with code style.

Suggested change
export function usePlacement(handleOrDID,shoulduserPlacement) {
export function usePlacement(handleOrDID, shoulduserPlacement) {

Copilot uses AI. Check for mistakes.

const profileQuery = useResolveHandleOrDid(handleOrDID);
const shortHandle = profileQuery.data?.shortHandle;

return useQuery({
enabled: !!shortHandle,
enabled: !!shortHandle && shoulduserPlacement,
queryKey: ['place', shortHandle],
// @ts-expect-error shortHandle will be a string, as the query is skipped otherwise
queryFn: () => getPlacement(shortHandle),
Expand Down
14 changes: 10 additions & 4 deletions src/detail-panels/account-header/account-extra-info.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { useAccountResolver } from '../account-resolver';
import './account-extra-info.css';
import { HandleHistory } from './handle-history';
import { PDSName } from './handle-history/pds-name';
import { useFeatureFlag } from '../../api/featureFlags';

/**
* @param {{
Expand All @@ -22,18 +23,23 @@ import { PDSName } from './handle-history/pds-name';
export function AccountExtraInfo({ className, onInfoClick, ...rest }) {
const accountQuery = useAccountResolver();
const account = accountQuery.data;
const handleHistoryQuery = useHandleHistory(account?.shortDID);
const handleHistory = handleHistoryQuery.data?.handle_history;
const shouldIshandleHistory = useFeatureFlag('handle-history')
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement. Add semicolon for consistency with other variable declarations.

Suggested change
const shouldIshandleHistory = useFeatureFlag('handle-history')
const shouldIshandleHistory = useFeatureFlag('handle-history');

Copilot uses AI. Check for mistakes.


// calls only if ishandleHistory is true
const handleHistoryQuery = useHandleHistory(account?.shortDID,shouldIshandleHistory);
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function arguments. Add space after comma for consistency with code style.

Suggested change
const handleHistoryQuery = useHandleHistory(account?.shortDID,shouldIshandleHistory);
const handleHistoryQuery = useHandleHistory(account?.shortDID, shouldIshandleHistory);

Copilot uses AI. Check for mistakes.

const handleHistory = handleHistoryQuery?.data?.handle_history;

const profileDescription = useFeatureFlag('profile-description')
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement. Add semicolon for consistency with other variable declarations.

Suggested change
const profileDescription = useFeatureFlag('profile-description')
const profileDescription = useFeatureFlag('profile-description');

Copilot uses AI. Check for mistakes.

return (
<div className={'account-extra-info ' + (className || '')} {...rest}>
<div className="close-opt" onClick={onInfoClick}>
&times;
</div>
<div className="bio-section">
{profileDescription && (<div className="bio-section">
{!account?.description ? undefined : (
<MultilineFormatted text={account?.description} />
)}
</div>
</div>)}
<div className="did-section">
<DidWithCopyButton
shortDID={account?.shortDID}
Expand Down
11 changes: 8 additions & 3 deletions src/detail-panels/account-header/account-header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { Button } from '@mui/material';
import { useAccountResolver } from '../account-resolver';
import { useHandleHistory } from '../../api/handle-history';
import { usePlacement } from '../../api/placement';
import { useFeatureFlag } from '../../api/featureFlags';

/**
* @param {{
Expand All @@ -25,11 +26,15 @@ export function AccountHeader({ className, onInfoClick }) {
const [isCopied, setIsCopied] = useState(false);
// const [handleHistoryExpanded, setHandleHistoryExpanded] = useState(false);
const resolved = useAccountResolver();
const handleHistoryQuery = useHandleHistory(resolved.data?.shortDID);
const handleHistoryQuery = useHandleHistory(resolved.data?.shortDID,true);
Copy link

Copilot AI Jul 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] This unconditionally fetches handle history. It would be better to gate it behind a feature flag (as in AccountExtraInfo) instead of passing true directly.

Suggested change
const handleHistoryQuery = useHandleHistory(resolved.data?.shortDID,true);
const shouldFetchHandleHistory = useFeatureFlag('handle-history');
const handleHistoryQuery = useHandleHistory(resolved.data?.shortDID, shouldFetchHandleHistory);

Copilot uses AI. Check for mistakes.

const handleHistory = handleHistoryQuery.data?.handle_history;

const placementquery = usePlacement(resolved.data?.shortDID);
const placement = placementquery.data?.placement?.toLocaleString() ?? '';
const shoulduserPlacement = useFeatureFlag('user-placement')
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement. Add semicolon for consistency with other variable declarations.

Suggested change
const shoulduserPlacement = useFeatureFlag('user-placement')
const shoulduserPlacement = useFeatureFlag('user-placement');

Copilot uses AI. Check for mistakes.


// call only if userPlacement is true
const placementquery = usePlacement(resolved.data?.shortDID,shoulduserPlacement);
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space after comma in function arguments. Add space after comma for consistency with code style.

Suggested change
const placementquery = usePlacement(resolved.data?.shortDID,shoulduserPlacement);
const placementquery = usePlacement(resolved.data?.shortDID, shoulduserPlacement);

Copilot uses AI. Check for mistakes.

// console.log(placementquery)
const placement = placementquery?.data?.placement?.toLocaleString() ?? '';

const firstHandleChangeTimestamp =
handleHistory?.length && handleHistory[handleHistory.length - 1][1];
Expand Down
2 changes: 2 additions & 0 deletions src/detail-panels/block-panel-generic/block-panel-generic.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ export function BlockPanelGeneric({
const blocklistPages = data?.pages || [];
const blocklist = blocklistPages.flatMap((page) => page.blocklist);
const count = totalData?.count;


// const [searchParams, setSearchParams] = useSearchParams();
// const [tick, setTick] = useState(0);
Expand Down Expand Up @@ -119,6 +120,7 @@ class PanelHeader extends React.Component {
}

const { blocklist, header } = this.props;


return (
<h3
Expand Down
10 changes: 6 additions & 4 deletions src/detail-panels/blocked-by-lists/blocked-by-lists-index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import { SearchHeaderDebounced } from '../history/search-header';
import { VisibleWithDelay } from '../../common-components/visible';
import { resolveHandleOrDID } from '../../api';
import { useAccountResolver } from '../account-resolver';
import { useFeatureFlag } from '../../api/featureFlags';

export function BlockedByLists() {
const accountQuery = useAccountResolver();
const shortHandle = accountQuery.data?.shortHandle;
const { data, fetchNextPage, hasNextPage, isLoading, isFetching } = useBlockedByLists(shortHandle);
const { data: totalData, isLoading: isLoadingTotal } = useBlockedByListsTotal(shortHandle);
const shouldFetchlistsBlockedByCount = useFeatureFlag('lists-blocked-by-count')
const { data: totalData, isLoading: isLoadingTotal } = useBlockedByListsTotal(shortHandle,shouldFetchlistsBlockedByCount);
Comment on lines +23 to +24
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement on line 23 and missing space after comma in function arguments on line 24.

Suggested change
const shouldFetchlistsBlockedByCount = useFeatureFlag('lists-blocked-by-count')
const { data: totalData, isLoading: isLoadingTotal } = useBlockedByListsTotal(shortHandle,shouldFetchlistsBlockedByCount);
const shouldFetchlistsBlockedByCount = useFeatureFlag('lists-blocked-by-count');
const { data: totalData, isLoading: isLoadingTotal } = useBlockedByListsTotal(shortHandle, shouldFetchlistsBlockedByCount);

Copilot uses AI. Check for mistakes.


const [searchParams, setSearchParams] = useSearchParams();
const [tick, setTick] = useState(0);
Expand All @@ -37,7 +39,7 @@ export function BlockedByLists() {
<div style={{ padding: '1em', textAlign: 'center', opacity: '0.5' }}>
<CircularProgress size="1.5em" />
<div style={{ marginTop: '0.5em' }}>
{'Loading blocked by lists...'}
{shouldFetchlistsBlockedByCount && ('Loading blocked by lists...')}
</div>
</div>
);
Expand All @@ -57,7 +59,7 @@ export function BlockedByLists() {

<h3 className='lists-header'>
{(isLoadingTotal && !listsTotal) && <span style={{ opacity: 0.5 }}>{"Counting block lists..."}</span>}
{listsTotal ?
{shouldFetchlistsBlockedByCount && (listsTotal ?
<>
{`Blocked by ${Intl.NumberFormat().format(listsTotal)} users via lists`}
<span className='panel-toggles'>
Expand All @@ -70,7 +72,7 @@ export function BlockedByLists() {
}
</span>
</> :
isLoadingTotal ? null : 'Not blocked by any users via lists'
isLoadingTotal ? null : 'Not blocked by any users via lists')
}
</h3>

Expand Down
13 changes: 7 additions & 6 deletions src/detail-panels/blocked-by/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@ import { BlockPanelGeneric } from '../block-panel-generic';
import { localise } from '../../localisation';
import { useSingleBlocklistCount } from '../../api/blocklist';
import { useAccountResolver } from '../account-resolver';
import { useFeatureFlag } from '../../api/featureFlags';

export default function BlockedByPanel() {
const accountQuery = useAccountResolver();
const did = accountQuery.data?.shortDID;
const blocklistQuery = useSingleBlocklist(did);
const totalQuery = useSingleBlocklistCount(did);
const shouldFetchBlockedbyCount = useFeatureFlag('blocked-by-count')
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement. Add semicolon for consistency with other variable declarations.

Suggested change
const shouldFetchBlockedbyCount = useFeatureFlag('blocked-by-count')
const shouldFetchBlockedbyCount = useFeatureFlag('blocked-by-count');

Copilot uses AI. Check for mistakes.

const totalQuery = useSingleBlocklistCount(did, shouldFetchBlockedbyCount);
return (
<BlockPanelGeneric
className="blocked-by-panel"
blocklistQuery={blocklistQuery}
totalQuery={totalQuery}
header={({ count }) => (
<>
{localise(`Blocked by ${count.toLocaleString()}`, {
uk: `Блокують ${count.toLocaleString()}`,
header={({ count }) => (shouldFetchBlockedbyCount ? (<>
{localise(`Blocked by ${count.toLocaleString()}`, {
uk: `Блокують ${count.toLocaleString()}`,
})}
</>
</>) : null
)}
/>
);
Expand Down
13 changes: 7 additions & 6 deletions src/detail-panels/blocking-lists/blocking-lists-index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import { SearchHeaderDebounced } from '../history/search-header';
import { VisibleWithDelay } from '../../common-components/visible';
import { resolveHandleOrDID } from '../../api';
import { useAccountResolver } from '../account-resolver';
import { useFeatureFlag } from '../../api/featureFlags';

export function BlockingLists() {
const accountQuery = useAccountResolver();
const shortHandle = accountQuery.data?.shortHandle;
const { data, fetchNextPage, hasNextPage, isLoading, isFetching } = useBlockingLists(shortHandle);
const { data: totalData, isLoading: isLoadingTotal } = useBlockingListsTotal(shortHandle);
const shouldFetchlistsBlockingCount = useFeatureFlag('lists-blocking-count')
const { data: totalData, isLoading: isLoadingTotal } = useBlockingListsTotal(shortHandle,shouldFetchlistsBlockingCount);
Comment on lines +23 to +24
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon at end of statement on line 23 and missing space after comma in function arguments on line 24.

Suggested change
const shouldFetchlistsBlockingCount = useFeatureFlag('lists-blocking-count')
const { data: totalData, isLoading: isLoadingTotal } = useBlockingListsTotal(shortHandle,shouldFetchlistsBlockingCount);
const shouldFetchlistsBlockingCount = useFeatureFlag('lists-blocking-count');
const { data: totalData, isLoading: isLoadingTotal } = useBlockingListsTotal(shortHandle, shouldFetchlistsBlockingCount);

Copilot uses AI. Check for mistakes.


const [searchParams, setSearchParams] = useSearchParams();
const [tick, setTick] = useState(0);
Expand All @@ -30,15 +32,14 @@ export function BlockingLists() {
const listPages = data?.pages || [];
const allLists = listPages.flatMap((page) => page.blocklist);
const filteredLists = !search ? allLists : matchSearch(allLists, search, () => setTick(tick + 1));

// Show loader for initial load
if (isLoading) {
return (
<div style={{ padding: '1em', textAlign: 'center', opacity: '0.5' }}>
<CircularProgress size="1.5em" />
<div style={{ marginTop: '0.5em' }}>
{ shouldFetchlistsBlockingCount &&( <div style={{ marginTop: '0.5em' }}>
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space before opening parenthesis in logical AND expression. Add space before the opening parenthesis.

Suggested change
{ shouldFetchlistsBlockingCount &&( <div style={{ marginTop: '0.5em' }}>
{ shouldFetchlistsBlockingCount && ( <div style={{ marginTop: '0.5em' }}>

Copilot uses AI. Check for mistakes.

{'Loading blocking lists...'}
</div>
</div>)}
</div>
);
}
Expand All @@ -57,7 +58,7 @@ export function BlockingLists() {

<h3 className='lists-header'>
{(isLoadingTotal && !listTotalBlocks) && <span style={{ opacity: 0.5 }}>{"Counting lists..."}</span>}
{listTotalBlocks ?
{shouldFetchlistsBlockingCount && (listTotalBlocks ?
<>
{`Blocking ${Intl.NumberFormat().format(listTotalBlocks)} total users via lists`}
<span className='panel-toggles'>
Expand All @@ -70,7 +71,7 @@ export function BlockingLists() {
}
</span>
</> :
isLoadingTotal ? null : 'Not blocking any users via lists'
isLoadingTotal ? null : 'Not blocking any users via lists')
}
</h3>

Expand Down
Loading