fix: apply feedback

This commit is contained in:
abdou6666 2025-04-03 10:04:58 +01:00
parent 8077263ecf
commit d96ba082f7

View File

@ -22,18 +22,18 @@ export const CustomBlocks = () => {
{ entity: EntityType.CUSTOM_BLOCK },
{ hasCount: false },
);
const memoizedCustomBlock = useMemo(
const memoizedCustomBlocks = useMemo(
() => customBlocks.sort((a, b) => a.id.localeCompare(b.id)),
[customBlocks],
);
return memoizedCustomBlock.length ? (
return memoizedCustomBlocks.length ? (
<>
<Grid mb="2">
<StyledTitle>{t("title.custom_blocks")}</StyledTitle>
</Grid>
<Grid container>
{memoizedCustomBlock.map((customBlock) => (
{memoizedCustomBlocks.map((customBlock) => (
<Block
key={customBlock.id}
title={t(`title.${customBlock.namespace}`, {