Skip to content
This repository was archived by the owner on Aug 2, 2025. It is now read-only.

Commit 69ee220

Browse files
committed
fix: show outline around correct period
1 parent 2d9730c commit 69ee220

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "timetabl-app",
3-
"version": "1.0.11-beta",
3+
"version": "1.0.12-beta",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

src/routes/Main/Home/Home.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ const HomeView = ({
6262

6363
const [countdown, setCountdown] = useState("");
6464

65-
const activeIndex = periods.findIndex(
66-
({ time, endTime }) => (time < DateTime.now() && endTime) ?? false
67-
);
65+
const activeIndex =
66+
date === initialDate
67+
? periods.findIndex(
68+
({ time, endTime }) =>
69+
time < DateTime.now() && DateTime.now() < endTime
70+
)
71+
: -1;
6872

6973
return (
7074
<LayoutGroup>
@@ -158,8 +162,6 @@ const HomeView = ({
158162
export default function Home() {
159163
const [date, setDate] = useState<string | undefined>();
160164

161-
console.log(date);
162-
163165
return (
164166
<QueriesHandler queries={{ dtt: useDTT(true, date), initialDtt: useDTT() }}>
165167
{(

0 commit comments

Comments
 (0)