mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-24 17:51:14 +02:00
fix: don't call location hook conditionally in CR badge (#10676)
Fixes a bug where I added a conditional hook call in https://github.com/Unleash/unleash/pull/10651.
This commit is contained in:
parent
38de4db3e2
commit
6be5e6c969
@ -25,6 +25,7 @@ const DraftBadge: VFC = () => <Badge color='warning'>Draft</Badge>;
|
||||
export const ChangeRequestStatusBadge: VFC<IChangeRequestStatusBadgeProps> = ({
|
||||
changeRequest,
|
||||
}) => {
|
||||
const { locationSettings } = useLocationSettings();
|
||||
if (!changeRequest) {
|
||||
return null;
|
||||
}
|
||||
@ -60,7 +61,6 @@ export const ChangeRequestStatusBadge: VFC<IChangeRequestStatusBadgeProps> = ({
|
||||
);
|
||||
case 'Scheduled': {
|
||||
const { schedule } = changeRequest;
|
||||
const { locationSettings } = useLocationSettings();
|
||||
const scheduledAt = new Date(schedule.scheduledAt).toLocaleString(
|
||||
locationSettings.locale,
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user