biome
This commit is contained in:
@@ -31,7 +31,7 @@ export function GenericInput<T extends FieldValues>({
|
|||||||
}: GenericFormElementProps<T, InputFieldProps<T>>) {
|
}: GenericFormElementProps<T, InputFieldProps<T>>) {
|
||||||
const [passwordShown, setPasswordShown] = useState(false);
|
const [passwordShown, setPasswordShown] = useState(false);
|
||||||
const togglePasswordVisiblity = () => {
|
const togglePasswordVisiblity = () => {
|
||||||
setPasswordShown(passwordShown ? false : true);
|
setPasswordShown(!passwordShown);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -40,9 +40,11 @@ export function GenericInput<T extends FieldValues>({
|
|||||||
control={control}
|
control={control}
|
||||||
render={({ field: { value, onChange, ...rest } }) => (
|
render={({ field: { value, onChange, ...rest } }) => (
|
||||||
<Input
|
<Input
|
||||||
type={field.type == "password" && passwordShown ? "text" : field.type}
|
type={
|
||||||
|
field.type === "password" && passwordShown ? "text" : field.type
|
||||||
|
}
|
||||||
action={
|
action={
|
||||||
field.type == "password"
|
field.type === "password"
|
||||||
? {
|
? {
|
||||||
icon: passwordShown ? EyeOff : Eye,
|
icon: passwordShown ? EyeOff : Eye,
|
||||||
onClick: togglePasswordVisiblity,
|
onClick: togglePasswordVisiblity,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ export function PasswordGenerator<T extends FieldValues>({
|
|||||||
}: GenericFormElementProps<T, PasswordGeneratorProps<T>>) {
|
}: GenericFormElementProps<T, PasswordGeneratorProps<T>>) {
|
||||||
const [passwordShown, setPasswordShown] = useState(false);
|
const [passwordShown, setPasswordShown] = useState(false);
|
||||||
const togglePasswordVisiblity = () => {
|
const togglePasswordVisiblity = () => {
|
||||||
setPasswordShown(passwordShown ? false : true);
|
setPasswordShown(!passwordShown);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export const MessagesPage = (): JSX.Element => {
|
|||||||
chatType === "broadcast" && currentChannel
|
chatType === "broadcast" && currentChannel
|
||||||
? getChannelName(currentChannel)
|
? getChannelName(currentChannel)
|
||||||
: chatType === "direct" && nodes.get(activeChat)
|
: chatType === "direct" && nodes.get(activeChat)
|
||||||
? (nodes.get(activeChat)?.user?.longName ?? nodeHex)
|
? nodes.get(activeChat)?.user?.longName ?? nodeHex
|
||||||
: "Loading..."
|
: "Loading..."
|
||||||
}`}
|
}`}
|
||||||
actions={
|
actions={
|
||||||
|
|||||||
Reference in New Issue
Block a user