remove used imports and rename clickEventCb

This commit is contained in:
Hunter Thornsberry
2024-08-06 01:04:44 -04:00
parent 6bbe995ee5
commit faf094084c
2 changed files with 2 additions and 5 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
}); });
}; };
const clickEventCb = (e) => { const clickEvent = () => {
setPass( setPass(
btoa( btoa(
cryptoRandomString({ cryptoRandomString({
@@ -103,7 +103,7 @@ export const Channel = ({ channel }: SettingsPanelProps): JSX.Element => {
devicePSKBitCount: bitCount ?? 0, devicePSKBitCount: bitCount ?? 0,
properties: { properties: {
value: pass, value: pass,
onClick: clickEventCb, onClick: clickEvent,
changeEvent: (e: string) => setBits(Number.parseInt(e)), changeEvent: (e: string) => setBits(Number.parseInt(e)),
}, },
}, },
-3
View File
@@ -10,9 +10,6 @@ import {
SelectTrigger, SelectTrigger,
SelectValue, SelectValue,
} from "@components/UI/Select.js"; } from "@components/UI/Select.js";
import { fromByteArray, toByteArray } from "base64-js";
import cryptoRandomString from "crypto-random-string";
import { useState } from "react";
const generatorVariants = cva( const generatorVariants = cva(
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2", "inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus:outline-none focus:ring-2",