From ef6eeff53423908351566df5bee7255fb9466ee1 Mon Sep 17 00:00:00 2001 From: Neal Ormsbee Date: Mon, 14 Aug 2023 10:59:07 -0600 Subject: [PATCH] Change opencost plugin to use @date-io/luxon instead of @date-io/date-fns Signed-off-by: Neal Ormsbee --- plugins/opencost/package.json | 2 +- plugins/opencost/src/components/SelectWindow.jsx | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/opencost/package.json b/plugins/opencost/package.json index 2dde15362b..af2a275a52 100644 --- a/plugins/opencost/package.json +++ b/plugins/opencost/package.json @@ -25,7 +25,7 @@ "@backstage/core-components": "workspace:^", "@backstage/core-plugin-api": "workspace:^", "@backstage/theme": "workspace:^", - "@date-io/date-fns": "^2.16.0", + "@date-io/luxon": "1.x", "@material-ui/core": "^4.9.13", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "^4.0.0-alpha.60", diff --git a/plugins/opencost/src/components/SelectWindow.jsx b/plugins/opencost/src/components/SelectWindow.jsx index 87ecfe093e..e374571c00 100644 --- a/plugins/opencost/src/components/SelectWindow.jsx +++ b/plugins/opencost/src/components/SelectWindow.jsx @@ -16,13 +16,13 @@ import React, { useEffect, useState } from 'react'; import { makeStyles } from '@material-ui/styles'; -import { endOfDay, startOfDay } from 'date-fns'; +import { endOfDay, startOfDay } from '@date-io/luxon'; import { MuiPickersUtilsProvider, KeyboardDatePicker, } from '@material-ui/pickers'; import Button from '@material-ui/core/Button'; -import DateFnsUtils from '@date-io/date-fns'; +import LuxonUtils from '@date-io/luxon'; import FormControl from '@material-ui/core/FormControl'; import Link from '@material-ui/core/Link'; import Popover from '@material-ui/core/Popover'; @@ -141,7 +141,7 @@ const SelectWindow = ({ windowOptions, window, setWindow }) => { >
- +