Skip to content

Commit

Permalink
refactor: convert classless divs to fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
kevhjc committed Feb 28, 2022
1 parent 19bea9c commit c6c0ac1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/components/CommandPalette.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,23 +123,23 @@ function CommandMenu() {
style={{ padding: '9rem 16px 16px' }}
>
{session ? (
<div>
<>
<span
className="fixed top-20 z-20 flex cursor-pointer justify-center rounded-lg border border-neutral-200 bg-white/80 px-4 py-2 font-mono dark:border-neutral-700/80 dark:bg-neutral-800 dark:text-neutral-100/80
"
>
<PersonIcon className="mr-2 h-6 w-4 opacity-80" />
{session.user.email}
</span>
</div>
</>
) : null}
<KBarAnimator className="z-10 w-full max-w-2xl overflow-hidden rounded-lg border border-neutral-300 bg-white/80 shadow-2xl backdrop-blur-sm dark:border-neutral-700 dark:bg-neutral-800/80 dark:text-white">
<div>
<>
<KBarSearch
defaultPlaceholder="What would you like to do?"
className="mb-2 box-border w-full border-b-[1px] bg-white/70 px-4 pt-4 pb-4 outline-none backdrop-blur-sm dark:border-neutral-700/80 dark:bg-neutral-800/80 dark:placeholder:text-neutral-100/60"
/>
</div>
</>
<div className="pb-2">
<Results />
</div>
Expand Down Expand Up @@ -262,7 +262,7 @@ const ResultItem = React.forwardRef(
</span>

<div className="mt-0.5 flex flex-col">
<div>
<>
{ancestors.length > 0 &&
ancestors.map((ancestor: ActionImpl) => (
<React.Fragment key={ancestor.id}>
Expand All @@ -271,7 +271,7 @@ const ResultItem = React.forwardRef(
</React.Fragment>
))}
<span>{action.name}</span>
</div>
</>
{action.subtitle && (
<span className="text-[0.75rem]">{action.subtitle}</span>
)}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const Home = () => {
};

return (
<div>
<>
{location.pathname === PATHS.NEW_NOTE && (
<AddNote userEntries={userEntries} setUserEntries={setUserEntries} />
)}
Expand Down Expand Up @@ -133,7 +133,7 @@ const Home = () => {
</ul>
</div>
</div>
</div>
</>
);
};

Expand Down
8 changes: 4 additions & 4 deletions src/components/NoteEntryView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const NoteEntryView = () => {
</div>
<div className="group relative mt-12 mb-24">
{editMode ? (
<div>
<>
<span className="absolute top-0 -mt-8 hidden text-xs text-neutral-400 group-hover:block">
{'Body'}
</span>
Expand All @@ -153,9 +153,9 @@ const NoteEntryView = () => {
>
{entry[0].content}
</p>
</div>
</>
) : (
<div>
<>
<span className="absolute top-0 -mt-8 hidden text-xs text-neutral-400 group-hover:block">
{'Body'}
</span>
Expand All @@ -165,7 +165,7 @@ const NoteEntryView = () => {
>
{entry[0].content}
</p>
</div>
</>
)}
</div>
</div>
Expand Down

1 comment on commit c6c0ac1

@vercel
Copy link

@vercel vercel bot commented on c6c0ac1 Feb 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.