mirror of
https://github.com/Xevion/bus-reminder.git
synced 2025-12-06 17:14:34 -06:00
Fix isCurrent text & logic with new isTimeMatched function
This commit is contained in:
@@ -4,7 +4,8 @@ import {
|
|||||||
type Configuration,
|
type Configuration,
|
||||||
type DayEnum,
|
type DayEnum,
|
||||||
numberAsDay,
|
numberAsDay,
|
||||||
ParsedTime
|
ParsedTime,
|
||||||
|
isTimeMatched
|
||||||
} from '@/timing';
|
} from '@/timing';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
|
|
||||||
@@ -87,7 +88,7 @@ const ConfigurationItem: FunctionComponent<{
|
|||||||
: 'text-yellow-900 bg-yellow-500/80'
|
: 'text-yellow-900 bg-yellow-500/80'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
Not Current
|
{isCurrent ? 'Current' : 'Not Current'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -131,7 +132,7 @@ const ConfigurationList: FunctionComponent<ConfigurationListProps> = ({
|
|||||||
{configs.times.map((config, index) => (
|
{configs.times.map((config, index) => (
|
||||||
<ConfigurationItem
|
<ConfigurationItem
|
||||||
key={index}
|
key={index}
|
||||||
isCurrent={index % 2 == 0}
|
isCurrent={isTimeMatched(config)}
|
||||||
days={config.days}
|
days={config.days}
|
||||||
title={config.name}
|
title={config.name}
|
||||||
message={config.message}
|
message={config.message}
|
||||||
|
|||||||
Reference in New Issue
Block a user