fix : types

pull/2277/head
Agusti Fernandez Pardo 2022-04-13 03:14:21 +02:00
parent a98a484f88
commit 40e1c035df
1 changed files with 3 additions and 4 deletions

View File

@ -29,7 +29,7 @@ export default function ApiKeyDialogForm(props: {
const { t } = useLocale();
const utils = trpc.useContext();
const [neverExpires, setNeverExpires] = useState(false);
const handleNoteChange = (e: { target: { value: string | null } }) => {
const handleNoteChange = (e: { target: { value: string } }) => {
form.setValue("note", e.target.value);
};
const {
@ -49,7 +49,7 @@ export default function ApiKeyDialogForm(props: {
note: "" as string | null,
});
const handleDateChange = (e: SetStateAction<Date> | null) => {
const handleDateChange = (e: Date) => {
setSelectedDate(e);
form.setValue("expiresAt", e);
};
@ -89,10 +89,9 @@ export default function ApiKeyDialogForm(props: {
</Button>
</Tooltip>
</div>
{/* // FIXME: Don't hardcode en-GB locale for date formatting */}
<span className="text-sm text-gray-400">
{" "}
Expires {newApiKeyDetails?.expiresAt?.toLocaleDateString("en-GB", options)}
{t("expires")} {newApiKeyDetails?.expiresAt?.toLocaleDateString()}
</span>
</div>
<DialogFooter>