Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:disable publicchtbot #97

Open
wants to merge 3 commits into
base: feat/typescript
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/components/chat/chatInputBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const ChatInputBox: React.FC<ChatInputBoxProps> = ({ socketRef }) => {
onClick={handleSendClick}
disabled={isTimeout}
className={`absolute right-2 top-1/2 transform -translate-y-1/2 pr-5 ${
isTimeout ? "" : "bg-blue-500"
isTimeout ? "bg-blue-500" : ""
} text-white rounded-full p-2 cursor-pointer`}
>
<Image
Expand Down
9 changes: 6 additions & 3 deletions frontend/components/mdgBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { ProjectList } from "./projects/projectList";
import { BoxProps } from "../interface/interface";



export default function Box({ channel }: BoxProps) {
const router = useRouter();
const arr = ["public", "private", "chatbot"];
const newArr = arr.filter((item) => item !== channel);
const finalArr = newArr.map((item) => item.toUpperCase());
const isShown = router.pathname === "/";
const [projects, setProjects] = useState([]);
const [isHoveringChatBot,setIsHoveringChatBot]=useState<boolean>(false);

useEffect(() => {
async function fetchProjectsData() {
Expand Down Expand Up @@ -97,13 +97,16 @@ export default function Box({ channel }: BoxProps) {
</div>
</div>
</div>
<div className=" w-1/2 flex-grow bg-blue rounded-full border bg-white border-customBlue hover:bg-gray-50 hover:cursor-pointer flex-2 text-center dark:hover:bg-gray-100">
<div className=" w-1/2 flex-grow bg-blue rounded-full border bg-white border-customBlue hover:bg-gray-50 hover:cursor-pointer flex-2 text-center dark:hover:bg-gray-100"
onMouseEnter={() => setIsHoveringChatBot(true)}
onMouseLeave={() => setIsHoveringChatBot(false)}>
<div className="p-2.5">
<div
className=" text-sm text-customBlue border-collapse font-roboto leading-tight tracking-tight text-Roboto font-medium "
onClick={handleRoute2}
>
JOIN {finalArr[1]} CHAT

{isHoveringChatBot ? "CHATBOT COMING SOON":`JOIN ${finalArr[1]} CHAT` }
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion frontend/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
6 changes: 6 additions & 0 deletions frontend/pages/chat_bot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ export default function Home() {
}
}, []);

return(
<>
<h1>Not Found 404 ! </h1>
</>
);

return (
<>
<div className="main text-slate-950 bg-white w-full bg-contain ">
Expand Down
11 changes: 8 additions & 3 deletions frontend/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@ export default function Home() {
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
const [isChatBotModalOpen, setISChatBotModalOpen] = useState<boolean>(false);
const [redirect, setRedirect] = useState<string>("");
const [isHoveringChatBot,setIsHoveringChatBot]=useState<boolean>(false);

const openModal = (redirect:string) => {
setIsModalOpen(true);
setRedirect(redirect);
};

const openChatBotModal = () => {
setISChatBotModalOpen(true);
// setISChatBotModalOpen(true);
window.open("/404","_self");
};

const closeModal = () => {
Expand Down Expand Up @@ -74,10 +76,12 @@ export default function Home() {
<div
className="flex items-center justify-center py-4 w-full px-8 rounded-full bg-customBlue text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-customBlue focus:ring-opacity-50 hover:cursor-pointer"
onClick={goToChatbot}
onMouseEnter={() => setIsHoveringChatBot(true)}
onMouseLeave={() => setIsHoveringChatBot(false)}
>
<p className="font-Roboto font-medium text-xl tracking-tighter flex gap-2">
<Image alt={"chat bot"} src={ChatBot} />
TALK TO OUR CHATBOT
{isHoveringChatBot ? "COMING SOON" : "TALK TO OUR CHATBOT"}
</p>
</div>
<div
Expand All @@ -91,7 +95,8 @@ export default function Home() {
</div>
<div
className="flex items-center justify-center py-4 w-full px-8 rounded-full bg-customBlue text-white hover:bg-blue-600 focus:outline-none hover:cursor-pointer focus:ring-2 focus:ring-customBlue focus:ring-opacity-50"
onClick={goToPublicChat}
onClick={()=>window.open("/404", "_blank")}

>
<p className="font-Roboto font-medium text-xl tracking-tighter flex gap-2">
<Image alt={"slack logo"} src={SlackLogo} />
Expand Down