Skip to content

Commit

Permalink
chore: inline toInt function and remove utils file
Browse files Browse the repository at this point in the history
Grab bag of util functions makes me sad
  • Loading branch information
jamiebrynes7 committed Mar 14, 2024
1 parent d627cae commit ebd785b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 1 addition & 2 deletions plugin/src/ui/settings/AutoRefreshIntervalControl.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { useState, type ChangeEvent } from "react";
import { Input, TextField } from "react-aria-components";
import { toInt } from "../../utils";

type Props = {
initialValue: number;
Expand All @@ -20,7 +19,7 @@ export const AutoRefreshIntervalControl: React.FC<Props> = ({ initialValue, onCh
return;
}

const num = toInt(value);
const num = Math.floor(Number(value));
if (num < 0) {
return;
}
Expand Down
8 changes: 0 additions & 8 deletions plugin/src/utils.ts

This file was deleted.

0 comments on commit ebd785b

Please sign in to comment.