Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove unnecessary divs
Browse files Browse the repository at this point in the history
Johannes Busch committed Aug 5, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent f7a17c1 commit e2fb5ec
Showing 3 changed files with 11 additions and 13 deletions.
16 changes: 7 additions & 9 deletions lib/components/ChangelogContainer/index.tsx
Original file line number Diff line number Diff line change
@@ -57,14 +57,12 @@ export const ChangelogContainer: React.FC<Props> = ({
}

return (
<div>
<ChangelogContext.Provider value={{ data }}>
{errorMessage && <Error error={errorMessage} />}
{!errorMessage && loading && <Loading />}
{!errorMessage && !loading && data && (
<CssVarsProvider>{children}</CssVarsProvider>
)}
</ChangelogContext.Provider>
</div>
<ChangelogContext.Provider value={{ data }}>
{errorMessage && <Error error={errorMessage} />}
{!errorMessage && loading && <Loading />}
{!errorMessage && !loading && data && (
<CssVarsProvider>{children}</CssVarsProvider>
)}
</ChangelogContext.Provider>
);
};
4 changes: 2 additions & 2 deletions lib/components/ChangelogList/ChangelogList.tsx
Original file line number Diff line number Diff line change
@@ -50,14 +50,14 @@ export const ChangelogList: React.FC<Props> = ({
}, [data, groupBy]);

return (
<div>
<>
{componentChangelogs && (
<ComponentList
changelogs={componentChangelogs}
changeTypeMapper={changeTypeMapper}
typeColorResolver={typeColorResolver}
/>
)}
</div>
</>
);
};
4 changes: 2 additions & 2 deletions lib/components/ChangelogList/MinimalChangelogList.tsx
Original file line number Diff line number Diff line change
@@ -38,14 +38,14 @@ export const MinimalChangelogList: React.FC<Props> = ({
}, [data]);

return (
<div>
<>
{componentChangelogs && (
<ComponentList
changelogs={componentChangelogs}
changeTypeMapper={changeTypeMapper}
typeColorResolver={getTypeColor}
/>
)}
</div>
</>
);
};

0 comments on commit e2fb5ec

Please sign in to comment.