Skip to content

Fixed missing key react warnings #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2024
Merged
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
18 changes: 7 additions & 11 deletions src/components/base/VisualBuilderComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const VisualBuilderComponent: FC<VisualBuilderProps> = ({ key, version }) => {
refetch();
})
}, []);

const experiences = data?._Experience?.items;
if (!experiences) {
return null;
Expand All @@ -79,19 +79,15 @@ const VisualBuilderComponent: FC<VisualBuilderProps> = ({ key, version }) => {
<div className="relative w-full flex-1 vb:outline">
<div className="relative w-full flex-1 vb:outline">
{experience?.composition?.grids?.map((grid: any) =>
<div className="relative w-full flex flex-col flex-nowrap justify-start vb:grid"
data-epi-block-id={grid?.key}>
<div key={grid.key} className="relative w-full flex flex-col flex-nowrap justify-start vb:grid"
data-epi-block-id={grid.key}>
{grid.rows?.map((row: any) =>
<div
className="flex-1 flex flex-row flex-nowrap justify-start vb:row">
<div key={row.key} className="flex-1 flex flex-row flex-nowrap justify-start vb:row">
{row.columns?.map((column: any) => (
<div
className="flex-1 flex flex-col flex-nowrap justify-start vb:col">
<div className="flex-1 flex flex-col flex-nowrap justify-start vb:col" key={column.key}>
{column.elements?.map((element: any) =>
<div
data-epi-block-id={element?.key}>
<CompositionNodeComponent
compositionElementNode={element}/>
<div data-epi-block-id={element?.key} key={element?.key}>
<CompositionNodeComponent compositionElementNode={element}/>
</div>
)}
</div>
Expand Down
Loading