mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): missing key on list element
This commit is contained in:
parent
7f6f892533
commit
6db63349f8
@ -42,11 +42,11 @@ export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
|
|||||||
const boardElements = useMemo(() => {
|
const boardElements = useMemo(() => {
|
||||||
const elements = [];
|
const elements = [];
|
||||||
if (allowPrivateBoards && isPrivate && !boardSearchText.length) {
|
if (allowPrivateBoards && isPrivate && !boardSearchText.length) {
|
||||||
elements.push(<NoBoardBoard isSelected={selectedBoardId === 'none'} />);
|
elements.push(<NoBoardBoard key="none" isSelected={selectedBoardId === 'none'} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!allowPrivateBoards && !boardSearchText.length) {
|
if (!allowPrivateBoards && !boardSearchText.length) {
|
||||||
elements.push(<NoBoardBoard isSelected={selectedBoardId === 'none'} />);
|
elements.push(<NoBoardBoard key="none" isSelected={selectedBoardId === 'none'} />);
|
||||||
}
|
}
|
||||||
|
|
||||||
filteredBoards.forEach((board) => {
|
filteredBoards.forEach((board) => {
|
||||||
@ -105,7 +105,7 @@ export const BoardsList = ({ isPrivate }: { isPrivate?: boolean }) => {
|
|||||||
<Collapse in={isOpen}>
|
<Collapse in={isOpen}>
|
||||||
<Flex direction="column" gap={1}>
|
<Flex direction="column" gap={1}>
|
||||||
{boardElements.length ? (
|
{boardElements.length ? (
|
||||||
<>{boardElements}</>
|
boardElements
|
||||||
) : (
|
) : (
|
||||||
<Text variant="subtext" textAlign="center">
|
<Text variant="subtext" textAlign="center">
|
||||||
{t('boards.noBoards', { boardType: boardSearchText.length ? 'Matching' : '' })}
|
{t('boards.noBoards', { boardType: boardSearchText.length ? 'Matching' : '' })}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user