40
41 useEffect(() => {
42 fetchTasks();
43 loadUserPreferences();
44 }, []);
72 }
73
74 async function fetchTasks() {
75 try {
76 const response = await fetch("/get-tasks");
77 const data = await response.json();
78 setTaskLists(data);
79 } catch (error) {
80 console.error("Error fetching tasks", error);
81 }
82 }
86
87 try {
88 const response = await fetch("/add-task", {
89 method: "POST",
90 headers: { "Content-Type": "application/json" },
107
108 try {
109 const response = await fetch("/move-task", {
110 method: "POST",
111 headers: { "Content-Type": "application/json" },
125 async function removeTask(taskId, column) {
126 try {
127 const response = await fetch("/delete-task", {
128 method: "POST",
129 headers: { "Content-Type": "application/json" },
142
143 try {
144 const response = await fetch("/move-task", {
145 method: "POST",
146 headers: { "Content-Type": "application/json" },
174 if (!editedTaskText.trim() || !taskBeingEdited) return;
175 try {
176 const response = await fetch("/update-task", {
177 method: "POST",
178 headers: { "Content-Type": "application/json" },
73
74 try {
75 const response = await fetch('/generate', {
76 method: 'POST',
77 headers: { 'Content-Type': 'application/json' },
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },
27
28 try {
29 const response = await fetch("/chat", {
30 method: "POST",
31 headers: { "Content-Type": "application/json" },
20
21 try {
22 const response = await fetch("/chat", {
23 method: "POST",
24 headers: { "Content-Type": "application/json" },
27
28 try {
29 const response = await fetch("/chat", {
30 method: "POST",
31 headers: { "Content-Type": "application/json" },
187
188 try {
189 const response = await fetch("/", {
190 method: "POST",
191 body: JSON.stringify({
42
43 try {
44 const response = await fetch(`https://www.shovel.report/api/domains/${domain}`);
45 if (!response.ok) {
46 throw new Error(`HTTP error! status: ${response.status}`);
52 };
53 } catch (error) {
54 console.error("Error fetching technologies:", error);
55 return { services: [], social_media: {} };
56 }
187
188 try {
189 const response = await fetch("/", {
190 method: "POST",
191 body: JSON.stringify({