-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cambios a las rondas, calculo del tiempo en rango, formateo de archivos
Co-authored-by: Daniel Fernández Ocaña <[email protected]>
- Loading branch information
Showing
11 changed files
with
66 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { useStore } from "@nanostores/react"; | ||
import { timeInRangeStore } from "@/stores/timeInRangeStore"; | ||
import { timeElapsedStore } from "@/stores/timeElapsedStore"; | ||
import { roundDurationStore } from "@/stores/roundDurationStore"; | ||
import { roundNumberStore } from "@/stores/roundNumberStore"; | ||
|
||
export default function RoundData() { | ||
const timeInRange = useStore(timeInRangeStore); | ||
const timeElapsed = useStore(timeElapsedStore); | ||
const roundDuration = useStore(roundDurationStore); | ||
|
||
const roundNumber = useStore(roundNumberStore); | ||
|
||
return roundNumber === 0 ? ( | ||
<></> | ||
) : ( | ||
<div> | ||
<h4>Ronda {roundNumber}</h4> | ||
<p> | ||
<span>Duración total de la ronda:</span> | ||
{roundDuration}s | ||
</p> | ||
<p> | ||
<span>Tiempo en el rango:</span> | ||
<span>{timeInRange / 1000}s</span>/ {timeElapsed / 1000}s | ||
</p> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { atom } from "nanostores"; | ||
|
||
export const internalRefreshRateStore = atom<number>(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
// roundDurationStore.ts | ||
import { atom } from 'nanostores'; | ||
|
||
export const roundDurationStore = atom<number[]>([]); | ||
export const roundDurationStore = atom<number>(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { atom } from 'nanostores'; | ||
|
||
export const roundNumberStore = atom<number>(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { atom } from 'nanostores'; | ||
|
||
export const timeElapsedStore = atom<number>(0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { atom } from 'nanostores'; | ||
|
||
export const timeInRangeStore = atom<number>(0); |