Fix logic for setting and sending the initial chat message from the home page

- Load agents only once when the page loads, rather than triggering constant re-renders
This commit is contained in:
sabaimran
2024-08-01 13:53:16 +05:30
parent 9a43622cef
commit fd0e0405af
3 changed files with 28 additions and 27 deletions

View File

@@ -85,7 +85,6 @@ function getEveryBlahFromCron(cron: string) {
function getDayOfWeekFromCron(cron: string) {
const cronParts = cron.split(' ');
console.log(cronParts);
if (cronParts[3] === '*' && cronParts[4] !== '*') {
return Number(cronParts[4]);
}
@@ -248,7 +247,6 @@ function AutomationsCard(props: AutomationsCardProps) {
setTimeRecurrence(getTimeRecurrenceFromCron(automationData.crontime));
const frequency = getEveryBlahFromCron(automationData.crontime);
console.log('frequency', frequency);
if (frequency === 'Day') {
setIntervalString('Daily');
} else if (frequency === 'Week') {