Skip to content

Commit

Permalink
feat: updated the styles and urls
Browse files Browse the repository at this point in the history
  • Loading branch information
nahyan0077 committed Jul 15, 2024
1 parent 5a0be15 commit 74b2d30
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 30 deletions.
8 changes: 5 additions & 3 deletions src/components/common/chat/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ export const ChatMessage: React.FC<MessageProps> = ({
const [isModalVisible, setModalVisible] = useState(false);
const { socket } = useContext(SocketContext) || {};


console.log("message ---> content type", message.contentType);

const handleDeleteChat = () => {
setModalVisible(true);
};

const handleDelete = async () => {
console.log(currentChat, "cur uder check");


if (message?.chatId) {
await dispatch(
updateMessageAction({ _id: message?._id, isDeleted: true })
Expand Down Expand Up @@ -115,7 +117,7 @@ export const ChatMessage: React.FC<MessageProps> = ({
</div>
);
default:
return <p>{message.content}</p>;
return <p className="text-xs lg:text-sm" >{message.content}</p>;
}
};

Expand Down
2 changes: 2 additions & 0 deletions src/components/common/chat/ChatWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ export const ChatWindow: React.FC<ChatWindowProps> = ({
const handleSendMessage = async () => {
if (inputMessage.trim() || selectedFile || audioBlob) {
if (selectedFile) {
console.log("----->seleected file",selectedFile.type);

if (selectedFile?.type.startsWith("image/")) {
setFileType("image");
} else if (selectedFile?.type.startsWith("video/")) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/common/mentors/AllMentors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ export const AllMentors: React.FC = () => {
<div className="grid grid-cols-1 md:grid-cols-3 gap-8">
<SubscriptionCard
title="Basic"
price="₹299/mo"
price="₹299"
description1="Essential features for individuals"
description2="Essential features for individuals"
description3="Essential features for individuals"
index={0}
/>
<SubscriptionCard
title="Pro"
price="₹699/mo"
price="₹699"
description1="Advanced features for professionals"
description2="Advanced features for professionals"
description3="Advanced features for professionals"
Expand All @@ -75,7 +75,7 @@ export const AllMentors: React.FC = () => {
/>
<SubscriptionCard
title="Enterprise"
price="₹499/mo"
price="₹499"
description1="Full suite for large organizations"
description2="Full suite for large organizations"
description3="Full suite for large organizations"
Expand Down
36 changes: 18 additions & 18 deletions src/components/common/users/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,26 @@ const Header: React.FC = () => {
dispatch(getAllActiveCategories());
}, [dispatch]);

useEffect(() => {
const handleClickOutside = (event: Event) => {
if (
sideBarRef.current &&
!sideBarRef.current.contains(event.target as Node)
) {
setMenuOpen(false);
}
};
// useEffect(() => {
// const handleClickOutside = (event: Event) => {
// if (
// sideBarRef.current &&
// !sideBarRef.current.contains(event.target as Node)
// ) {
// setMenuOpen(false);
// }
// };

if (menuOpen) {
document.addEventListener("mousedown", handleClickOutside);
} else {
document.removeEventListener("mousedown", handleClickOutside);
}
// if (menuOpen) {
// document.addEventListener("mousedown", handleClickOutside);
// } else {
// document.removeEventListener("mousedown", handleClickOutside);
// }

return () => {
document.removeEventListener("mousedown", handleClickOutside);
};
}, [menuOpen]);
// return () => {
// document.removeEventListener("mousedown", handleClickOutside);
// };
// }, [menuOpen]);

const catgoryData = useSelector((state: RootState) => state.category);

Expand Down
6 changes: 3 additions & 3 deletions src/components/home/FeaturesSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ const FeaturesSection: React.FC = () => {
<div className="max-w-7xl mx-auto grid grid-cols-1 md:grid-cols-3 gap-8 mb-20 mt-10">
<SubscriptionCard
title="Basic"
price="₹299/mo"
price="₹299"
description1="Unlimitted lifetime access"
description2="One-to-one chat with mentor"
description3="Limited access to contents"
index={0}
/>
<SubscriptionCard
title="Pro"
price="₹699/mo"
price="₹699"
description1="Unlimitted lifetime access"
description2="One-to-one voice and video mentoring"
description3="Full access to contents"
Expand All @@ -198,7 +198,7 @@ const FeaturesSection: React.FC = () => {
/>
<SubscriptionCard
title="Enterprise"
price="₹499/mo"
price="₹499"
description1="Unlimitted lifetime access"
description2="One-to-one chat and voice mentorship"
description3="Moderate access to contents"
Expand Down
2 changes: 1 addition & 1 deletion src/components/student/StudentChatSubscription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export const StudentChatSubscription: React.FC = () => {
className={`text-4xl font-extrabold mb-6 ${
plan.isPopular ? "text-yellow-400" : "text-violet-600"
}`}>
{plan.price} /month
{plan.price}
</p>
<p
className={`mb-4 ${
Expand Down
1 change: 1 addition & 0 deletions src/context/SocketProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const SocketProvider: React.FC<SocketProviderProps> = ({ children }) => {
if ((data?.role === "student" || data?.role === "instructor") && SOCKET_BACKEND_URL) {
const newSocket: Socket = io(SOCKET_BACKEND_URL, {
transports:['websocket', 'polling'],
// transports:['websocket'],
query: {
userId: data._id
}
Expand Down
4 changes: 2 additions & 2 deletions src/pages/auth/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ const Login: React.FC = () => {
<div className="flex justify-between">
{role == "" ? (
<p
className="text-center text-sm hover:cursor-pointer ml-2"
className="text-center text-xs md:text-sm hover:cursor-pointer ml-2"
onClick={() =>
navigate("/selection", {
state: location.state,
Expand All @@ -237,7 +237,7 @@ const Login: React.FC = () => {
</p>
)}
<div
className="text-violet-500 text-sm font-bold hover:cursor-pointer"
className="text-violet-500 text-xs md:text-sm font-bold hover:cursor-pointer"
onClick={() => navigate("/confirm-email")}>
Forgot Password?
</div>
Expand Down

0 comments on commit 74b2d30

Please sign in to comment.