use fragments instead of div to avoid layout problems

This commit is contained in:
Sebastian Sdorra
2020-07-02 11:27:46 +02:00
parent 8c67f6f048
commit e8eaaf486f
2 changed files with 12 additions and 7 deletions

View File

@@ -39,11 +39,11 @@ const textWrapper = (s: string) => {
const first = s.startsWith(" ") ? <>&nbsp;</> : "";
const last = s.endsWith(" ") ? <>&nbsp;</> : "";
return (
<div>
<>
{first}
{s}
{last}
</div>
</>
);
};
@@ -52,7 +52,7 @@ const SplitAndReplace: FC<Props> = ({ text, replacements }) => {
if (parts.length === 0) {
return <>{parts[0]}</>;
}
return <div className={"media"}>{parts}</div>;
return <>{parts}</>;
};
export default SplitAndReplace;