Browse Source

remove used imports and rename clickEventCb

pull/266/head
Hunter Thornsberry 2 years ago
parent
commit
faf094084c
  1. 4
      src/components/PageComponents/Channel.tsx
  2. 3
      src/components/UI/Generator.tsx

4
src/components/PageComponents/Channel.tsx

@ -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
src/components/UI/Generator.tsx

@ -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",

Loading…
Cancel
Save