Skip to content

Commit

Permalink
added new btns in project
Browse files Browse the repository at this point in the history
  • Loading branch information
sagarika-padmanaban committed Feb 29, 2024
1 parent 84603c2 commit b136934
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 31 deletions.
14 changes: 9 additions & 5 deletions src/app/ui/pages/chat/AllTaskPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import { useDispatch, useSelector } from "react-redux";
import { useParams, useNavigate, useLocation } from "react-router-dom";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import dynamic from "next/dynamic";
// const ReactQuill = dynamic(() => import("react-quill"), { ssr: false });
import ReactQuill, { Quill } from 'react-quill';
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false, loading: () => <p>Loading ...</p>, });

// import ReactQuill, { Quill } from 'react-quill';

import "./editor.css"
import 'quill/dist/quill.snow.css';
Expand Down Expand Up @@ -122,6 +123,8 @@ const AllTaskPage = () => {


useEffect(() => {
if (typeof window !== "undefined"&& annotationNotesRef.current && reviewNotesRef.current) {

fetchAnnotation(taskId).then((data) => {
if (data && Array.isArray(data) && data.length > 0) {
console.log(annotationNotesRef);
Expand Down Expand Up @@ -151,14 +154,15 @@ const AllTaskPage = () => {

}
});
}
}, [taskId]);

const resetNotes = () => {
// if (typeof window !== "undefined") {
setShowNotes(false);
if (typeof window !== "undefined"&& annotationNotesRef.current && reviewNotesRef.current) {
setShowNotes(false);
annotationNotesRef.current.getEditor().setContents([]);
reviewNotesRef.current.getEditor().setContents([]);
// }
}
};

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import { useDispatch, useSelector } from "react-redux";
import { useParams, useNavigate, useLocation } from "react-router-dom";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import dynamic from "next/dynamic";
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false });
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false, loading: () => <p>Loading ...</p>, });

// import ReactQuill, { Quill } from 'react-quill';
import "./editor.css"
import 'quill/dist/quill.snow.css';
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui/pages/chat/InstructionDrivenChatPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const InstructionDrivenChatPage = () => {
overflowX: "scroll"
}}
>
<Image
<img
width={50}
height={50}
src="https://i.imgur.com/56Ut9oz.png"
Expand Down
3 changes: 2 additions & 1 deletion src/app/ui/pages/chat/ReviewPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import { styled, alpha } from "@mui/material/styles";
import { useParams, useNavigate, useLocation } from "react-router-dom";
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
import dynamic from "next/dynamic";
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false });
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false, loading: () => <p>Loading ...</p>, });

// import ReactQuill, { Quill } from 'react-quill';
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import "./editor.css"
Expand Down
17 changes: 10 additions & 7 deletions src/app/ui/pages/chat/SuperCheckerPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import dynamic from "next/dynamic";
import MenuItem from "@mui/material/MenuItem";
import Menu, { MenuProps } from "@mui/material/Menu";
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false });
const ReactQuill = dynamic(() => import("react-quill"), { ssr: false, loading: () => <p>Loading ...</p>, });

// import ReactQuill, { Quill } from 'react-quill';
import "./editor.css"
import 'quill/dist/quill.snow.css';
Expand Down Expand Up @@ -121,6 +122,8 @@ const SuperCheckerPage = () => {
const [annotations, setAnnotations] = useState([]);

const annotationNotesRef = useRef(null);
const superCheckerNotesRef = useRef(null);

const [loading, setLoading] = useState(false);
const [disableButton, setDisableButton] = useState(false);

Expand Down Expand Up @@ -573,20 +576,20 @@ const SuperCheckerPage = () => {
}}
>
<ReactQuill
ref={annotationNotesRef}
ref={reviewNotesRef}
modules={modules}
formats={formats}
bounds={"#note"}
placeholder="Annotation Notes"
placeholder="Review Notes"
style={{ marginbottom: "1%", minHeight: "2rem" }}
readOnly={true}
></ReactQuill>
<ReactQuill
ref={reviewNotesRef}
ref={superCheckerNotesRef}
modules={modules}
formats={formats}
bounds={"#note"}
placeholder="Review Notes"
style={{ marginbottom: "1%", minHeight: "2rem" }}
readOnly={true}
placeholder="Superchecker Notes"
></ReactQuill>
</div>
<Button
Expand Down
22 changes: 11 additions & 11 deletions src/app/ui/pages/chat/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const Chat = () =>{
</>
) : (
<div className="w-[40vw] flex justify-start items-center space-x-6">
<Image alt="Anudesh"
<img alt="Anudesh"
src="https://i.imgur.com/56Ut9oz.png"
className="w-10 h-10"
/>
Expand All @@ -87,18 +87,18 @@ const Chat = () =>{
<div className="relative z-0 flex flex-col h-full w-full overflow-hidden">
<div className="flex justify-between w-full">
<div>
<Image alt="Anudesh"
<img alt="Anudesh"
src="https://i.imgur.com/56Ut9oz.png"
className="mt-4 ml-10 h-[61px] w-[60px]"
onClick={() => router.push("/home")}
></Image>
></img>
</div>
<div className="flex">
<Image alt="Anudesh"
<img alt="Anudesh"
src="https://i.imgur.com/FGmAyjz.png"
className="w-6 h-6 mt-11"
/>
<Image alt="Anudesh"
<img alt="Anudesh"
src="https://i.imgur.com/A3Rcbqe.jpeg"
className="w-6 h-6 mt-11 ml-4"
/>
Expand All @@ -112,10 +112,10 @@ const Chat = () =>{
{showChatContainer ? (
<>
<div className="w-auto h-36 mt-12 mx-auto bg-white rounded-2xl flex flex-row gap-2">
<Image alt="Anudesh"
<img alt="Anudesh"
src="https://i.imgur.com/56Ut9oz.png"
className="my-4 mx-5 h-[6.2rem] w-[6rem]"
></Image>
></img>
<div>
<h3 className="text-3xl text-orange-600 font-bold mt-8">
Namaste
Expand All @@ -138,7 +138,7 @@ const Chat = () =>{
onChange={(e) => setInputValue(e.target.value)}
/>
<IconButton onClick={handleButtonClick}>
<Image
<img
src="https://i.imgur.com/2sWOT6F.png"
className=" w-5 h-4 mt-2"
alt="Send Icon"
Expand All @@ -149,11 +149,11 @@ const Chat = () =>{
) : (
<>
<div className="w-auto h-36 mt-12 mx-auto bg-white rounded-2xl flex flex-row gap-2">
<Image
<img
alt="anudesh"
src="https://i.imgur.com/56Ut9oz.png"
className="mt-6 mx-5 h-[6.2rem] w-[6rem]"
></Image>
></img>
<div>
<h3 className="text-3xl text-orange-600 font-bold mt-8">
Namaste
Expand Down Expand Up @@ -190,7 +190,7 @@ const Chat = () =>{
onChange={(e) => setInputValue(e.target.value)}
/>
<IconButton onClick={handleButtonClick}>
<Image alt="Anudesh"
<img alt="Anudesh"
src="https://i.imgur.com/2sWOT6F.png"
className=" w-5 h-4 mt-2"
/>
Expand Down
4 changes: 2 additions & 2 deletions src/app/ui/pages/home/home.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/components/common/Header.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ const handleopenproject=(id,type)=>{
md={3}
>
<a style={{ display: "flex", alignItems: "center" }}>
<Image
<img
onClick={() => navigate("/")}
src="https://i.imgur.com/56Ut9oz.png"
alt="anudesh"
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/MobileNavbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ function MobileNavbar(props) {
<Grid item sx={{ display: "flex", alignItems: "center" }}>
<Link href="/projects">
Anudesh
{/* <Image alt="Anudesh" src={Shoonya_Logo} alt="logo" className="headerLogo" style={{marginBottom: "5%"}} /> */}
{/* <img alt="Anudesh" src={Shoonya_Logo} alt="logo" className="headerLogo" style={{marginBottom: "5%"}} /> */}
</Link>
<Typography
variant="h4"
Expand Down
2 changes: 1 addition & 1 deletion src/components/user/AppInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function AppInfo() {
<Grid container>
<Hidden only="xs">
<Grid item xs={10} sm={10} md={10} lg={10} xl={10} >
<Image src="https://i.imgur.com/56Ut9oz.png" alt="anudesh-logo" style={{ width: "85px", margin: "10% 0px 0% 35px", borderRadius: "50%" }} />
<img src="https://i.imgur.com/56Ut9oz.png" alt="anudesh-logo" style={{ width: "85px", margin: "10% 0px 0% 35px", borderRadius: "50%" }} />
</Grid>
</Hidden>

Expand Down

0 comments on commit b136934

Please sign in to comment.