Skip to content

Commit

Permalink
Remoção do spread operator e alteração de rows para minRows
Browse files Browse the repository at this point in the history
  • Loading branch information
rtenorioh committed Oct 23, 2024
1 parent 82ce9aa commit 62fd321
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
20 changes: 10 additions & 10 deletions frontend/src/components/QueueModal/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React, { useState, useEffect, useRef } from "react";
import React, { useEffect, useRef, useState } from "react";

import * as Yup from "yup";
import {
Formik,
Form,
Field
import {
Field,
Form,
Formik
} from "formik";
import * as Yup from "yup";

import {
Button,
Expand All @@ -24,10 +24,10 @@ import { green } from "@material-ui/core/colors";
import { toast } from "react-toastify";
import { i18n } from "../../translate/i18n";

import api from "../../services/api";
import { Colorize } from "@material-ui/icons";
import toastError from "../../errors/toastError";
import api from "../../services/api";
import ColorPicker from "../ColorPicker";
import { Colorize } from "@material-ui/icons";

const useStyles = makeStyles(theme => ({
root: {
Expand Down Expand Up @@ -223,7 +223,7 @@ const QueueModal = ({ open, onClose, queueId }) => {
type="greetingMessage"
multiline
inputRef={greetingRef}
rows={4}
minRows={4}
fullWidth
name="greetingMessage"
error={
Expand Down Expand Up @@ -295,7 +295,7 @@ const QueueModal = ({ open, onClose, queueId }) => {
type="absenceMessage"
multiline
inputRef={absenceRef}
rows={2}
minRows={2}
fullWidth
name="absenceMessage"
error={
Expand Down
7 changes: 3 additions & 4 deletions frontend/src/components/WhatsAppModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {

const handleSaveWhatsApp = async values => {
const whatsappData = { ...values, queueIds: selectedQueueIds };

try {
if (isHubSelected && selectedChannel) {
const selectedChannelObj = availableChannels.find(
Expand All @@ -188,7 +187,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
}
} else {
if (whatsAppId) {
await api.put(`/whatsapp/${whatsAppId}`, ...whatsappData);
await api.put(`/whatsapp/${whatsAppId}`, whatsappData);
} else {
await api.post("/whatsapp", whatsappData);
}
Expand Down Expand Up @@ -348,7 +347,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
label={i18n.t("queueModal.form.greetingMessage")}
type="greetingMessage"
multiline
rows={5}
minRows={5}
fullWidth
name="greetingMessage"
error={
Expand All @@ -367,7 +366,7 @@ const WhatsAppModal = ({ open, onClose, whatsAppId }) => {
label={i18n.t("whatsappModal.form.farewellMessage")}
type="farewellMessage"
multiline
rows={5}
minRows={5}
fullWidth
name="farewellMessage"
error={
Expand Down

0 comments on commit 62fd321

Please sign in to comment.