chore: lint

This commit is contained in:
Mo
2022-05-05 22:33:17 -05:00
parent da7d839fdd
commit cc2b223d0d
3 changed files with 57 additions and 48 deletions

View File

@@ -1,8 +1,9 @@
import { FunctionComponent } from 'preact'
import { HorizontalSeparator } from '@/Components/Shared/HorizontalSeparator'
const HorizontalLine: FunctionComponent<{ index: number; length: number }> = ({ index, length }) =>
(index < length - 1 ? <HorizontalSeparator classes="my-4" /> : null)
const HorizontalLine: FunctionComponent<{ index: number; length: number }> = ({ index, length }) => {
return index < length - 1 ? <HorizontalSeparator classes="my-4" /> : null
}
export const PreferencesGroup: FunctionComponent = ({ children }) => (
<div className="bg-default border-1 border-solid rounded border-main px-6 py-6 flex flex-col mb-3">

View File

@@ -53,8 +53,9 @@ export const RemoteHistoryList: FunctionComponent<RemoteHistoryListProps> = obse
ref={remoteHistoryListRef}
>
{isFetchingRemoteHistory && <div className="sk-spinner w-5 h-5 spinner-info"></div>}
{remoteHistory?.map((group) =>
(group.entries && group.entries.length ? (
{remoteHistory?.map((group) => {
if (group.entries && group.entries.length) {
return (
<Fragment key={group.title}>
<div className="px-3 mt-2.5 mb-1 font-semibold color-text uppercase color-grey-0 select-none">
{group.title}
@@ -75,8 +76,11 @@ export const RemoteHistoryList: FunctionComponent<RemoteHistoryListProps> = obse
</HistoryListItem>
))}
</Fragment>
) : null),
)}
)
} else {
return null
}
})}
{!remoteHistoryLength && !isFetchingRemoteHistory && (
<div className="color-grey-0 select-none">No remote history found</div>
)}

View File

@@ -53,8 +53,9 @@ export const SessionHistoryList: FunctionComponent<Props> = ({
}`}
ref={sessionHistoryListRef}
>
{sessionHistory?.map((group) =>
(group.entries && group.entries.length ? (
{sessionHistory?.map((group) => {
if (group.entries && group.entries.length) {
return (
<Fragment key={group.title}>
<div className="px-3 mt-2.5 mb-1 font-semibold color-text uppercase color-grey-0 select-none">
{group.title}
@@ -73,8 +74,11 @@ export const SessionHistoryList: FunctionComponent<Props> = ({
</HistoryListItem>
))}
</Fragment>
) : null),
)}
)
} else {
return null
}
})}
{!sessionHistoryLength && <div className="color-grey-0 select-none">No session history found</div>}
</div>
)