Skip to content
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

Fix bug in RecentProfiles.jsx #76

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
28 changes: 17 additions & 11 deletions src/scanning/scanningOptions/RecentProfiles/RecentProfiles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,24 @@ export const RecentProfiles = () => {
<div className="sp-content">
{profiles && userAccessibleGroups && (
<>
{profiles.length > 0 && defaultProfileIndex && (
{profiles.length > 0 && (
<IonList color="light" inset>
<ProfileListItem
key={profiles[defaultProfileIndex].name}
profile={profiles[defaultProfileIndex]}
userAccessibleGroups={userAccessibleGroups}
onClick={() =>
handleScanWithProfile(profiles[defaultProfileIndex])
}
/>
{profiles
.toSpliced(defaultProfileIndex, 1)
{defaultProfileIndex !== undefined &&
defaultProfileIndex !== -1 && (
<ProfileListItem
key={profiles[defaultProfileIndex].name}
profile={profiles[defaultProfileIndex]}
userAccessibleGroups={userAccessibleGroups}
onClick={() =>
handleScanWithProfile(profiles[defaultProfileIndex])
}
/>
)}
{(defaultProfileIndex !== undefined &&
defaultProfileIndex !== -1
? profiles.toSpliced(defaultProfileIndex, 1)
: profiles
)
.toSpliced(2)
.map((profile) => (
<ProfileListItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
display: grid;
grid-template-rows: auto 1fr auto;
height: 100%;
padding-bottom: calc(55px + #{var(--ion-safe-area-bottom)} + 1rem);
padding-bottom: 1rem;

.sp-header {
display: flex;
Expand Down
1 change: 0 additions & 1 deletion src/sources/SourceListScreen/SourceListScreen.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "./SourceListScreen.scss";
import { IonContent, IonHeader, IonTitle, IonToolbar } from "@ionic/react";
import { Suspense } from "react";
import { SourceList } from "../SourceList/SourceList.jsx";
Expand Down
8 changes: 0 additions & 8 deletions src/sources/SourceListScreen/SourceListScreen.scss

This file was deleted.

4 changes: 4 additions & 0 deletions src/theme/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -219,3 +219,7 @@ form {
--padding-bottom: 1rem;
}
}

ion-router-outlet {
padding-bottom: calc(2.6rem + var(--ion-safe-area-top));
}