Skip to content

Commit

Permalink
Adjusted Loader errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Pudi-Sravan committed Aug 25, 2024
1 parent 8db44c8 commit f8de7bd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
11 changes: 7 additions & 4 deletions src/Front_end/homepage/ToDo_list/assigntask.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const Assigntask = () => {
setFetchDone(true);
};
const handleSubmit = async () => {
setloader(true)
try {
setloader(true);
// Check if required fields are filled
Expand All @@ -150,7 +151,7 @@ const Assigntask = () => {
!taskDescription
) {
setShowNotification(true);
setloader(false);
setloader(false)
// Hide notification after 2.5 seconds
setTimeout(() => {
setShowNotification(false);
Expand All @@ -162,7 +163,7 @@ const Assigntask = () => {
const task_id = uuid(); // Generate a random UUID

let todoListData = {};

setloader(true)
if (!assignToMember) {
setloader(true);
todoListData = [
Expand All @@ -178,7 +179,7 @@ const Assigntask = () => {
assigned_byid: currentUser[0].id,
},
];
setloader(false);

await supabase
.from("Channel_todolist")
.update({ todo_list: todoListData })
Expand All @@ -199,7 +200,7 @@ const Assigntask = () => {
assigned_byid: currentUser[0].id,
},
];
setloader(false);

await supabase
.from("Todo_list")
.update({ todo_list: todoListData })
Expand Down Expand Up @@ -248,8 +249,10 @@ const Assigntask = () => {
setSearchQuery("");
setMembers([]);
setFetchDone(false);
setloader(false)
} catch (error) {
console.error("Error assigning task:", error.message);
setloader(false)
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/Front_end/homepage/channels/channelchat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@ export const Channelchats = () => {
setloader(false);
} catch (error) {
console.error("Error removing member:", error);
setloader(false)
}
setloader(false)
};
useEffect(() => {
const message = () => {
Expand Down
12 changes: 6 additions & 6 deletions src/Front_end/homepage/homepage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@
font-size: 35px;
height: 5%;
width: 100%;
background-color: #c5a326; /* Light yellow background */
background-color: #ebc747; /* Light yellow background */
display: flex;
align-items: center;
justify-content: baseline;
color: rgb(54, 88, 3);
color: rgb(94, 95, 11);
}

.chatbox {
Expand Down Expand Up @@ -124,7 +124,7 @@
overflow: hidden;
border-radius: 7px 0px 0px 7px;
position: relative;
background-color: #c5a326; /* Light yellow background */
background-color: #ebc747; /* Light yellow background */
}

.userleft {
Expand Down Expand Up @@ -225,7 +225,7 @@

.droph31,
.droph3 {
color: #606264;
color: #ffffff;
margin-right: 7px; /* Adjust as needed */
}

Expand Down Expand Up @@ -258,12 +258,12 @@
}
.schannel:hover,
.sdmcontact:hover {
background-color: #ffae00; /* Light orange background on hover */
background-color: #c48a0d; /* Light orange background on hover */
}

.schannelinfo,
.sdmcontactinfo {
color: #161e2b; /* Dark text color */
color: #083469; /* Dark text color */
display: flex;
justify-content: center;
margin-left: 8px;
Expand Down

0 comments on commit f8de7bd

Please sign in to comment.