Skip to content

Commit

Permalink
fix: merge ConnectionSelection
Browse files Browse the repository at this point in the history
  • Loading branch information
felixerdy committed Sep 12, 2023
1 parent 06e7308 commit f0510ad
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/Home/ConnectionSelection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,19 @@ export default function ConnectionSelection() {
/>
{!isConnected && (
<div>
Nicht mit senseBox verbunden. Ürprüfen Sie, ob das Gerät
Nicht mit senseBox verbunden. Überprüfen Sie, ob das Gerät
eingeschaltet ist und verbinden Sie das Gerät über Bluetooth
</div>
)}
{isConnected && <PreviewModal />}
{isConnected && (
<div>
Erfolgreich mit senseBox verbunden! Letzte Messung um{" "}
{values
.sort((a, b) => a.timestamp.getTime() - b.timestamp.getTime())
.at(-1)
?.timestamp.toLocaleTimeString() || "-"}
</div>
)}
</div>
<div className="flex flex-col items-center gap-2">
{!isConnected && (
Expand All @@ -49,11 +57,6 @@ export default function ConnectionSelection() {
)}
</div>
</div>
<Link href="/device" className="mx-auto">
<Button>
Bluetooth Device <ArrowRight className="inline-block w-4 h-4 ml-2" />
</Button>
</Link>
</div>
);
}

0 comments on commit f0510ad

Please sign in to comment.