diff --git a/src/Components/CustomFields/MathComponent.tsx b/src/Components/CustomFields/MathComponent.tsx index 24e13a2..0f17a1e 100644 --- a/src/Components/CustomFields/MathComponent.tsx +++ b/src/Components/CustomFields/MathComponent.tsx @@ -3,15 +3,15 @@ import { BlockMath } from 'react-katex'; import 'katex/dist/katex.min.css'; const LatexPreview = ({ latex }: { latex: string }) => { - console.log(latex); + // console.log(latex); - const sanitizedLatex = latex.replace(/\\_/g, '_'); + // const sanitizedLatex = latex.replace(/\\_/g, '_'); return (
- {sanitizedLatex} + {latex} diff --git a/src/Components/LatextInput/AddLaTexModal.tsx b/src/Components/LatextInput/AddLaTexModal.tsx index f9e6160..5d52352 100644 --- a/src/Components/LatextInput/AddLaTexModal.tsx +++ b/src/Components/LatextInput/AddLaTexModal.tsx @@ -29,8 +29,10 @@ const AddLaTexModal = ({name,setLatex,Latex,setIsModalOpen,isModalOpen,setCurren setLatex("") setIsModalOpen(false); }else{ - setLatex("") - toast.error(t("validation.that_is_not_a_valid_mml")) + setFieldValue(name, oldValue + " $$ " +Latex +" $$ "); + setCurrentValue(oldValue + " $$ " +Latex +" $$ ") + setLatex("") + setIsModalOpen(false); } }; diff --git a/src/Pages/Admin/Reseller/Form/PersonalDetailsForm.tsx b/src/Pages/Admin/Reseller/Form/PersonalDetailsForm.tsx index 554d6ca..1318ffc 100644 --- a/src/Pages/Admin/Reseller/Form/PersonalDetailsForm.tsx +++ b/src/Pages/Admin/Reseller/Form/PersonalDetailsForm.tsx @@ -54,7 +54,7 @@ const PersonalDetailsForm = ({isEdit}:{isEdit?:boolean}) => { placeholder={"_"} label={"ID Number"} /> - { name={"location_lng"} placeholder={"_"} label={"lng"} - /> + /> */} {/* { const sort_by = Filter?.sort_by ; const response = useGetAllUnit({ subject_id: subject_id, - pagination: false, + isPaginated: false, name, sort_by, ...filterState, diff --git a/src/Pages/Admin/lesson/DrapableTable.tsx b/src/Pages/Admin/lesson/DrapableTable.tsx index aad8339..e445a34 100644 --- a/src/Pages/Admin/lesson/DrapableTable.tsx +++ b/src/Pages/Admin/lesson/DrapableTable.tsx @@ -101,7 +101,7 @@ const DrapableTable: React.FC = () => { const response = useGetAllLesson({ unit_id: unit_id, - pagination: false, + isPaginated: false, name, sort_by, ...filterState, diff --git a/src/Pages/Home/Dummy.tsx b/src/Pages/Home/Dummy.tsx index f1761f5..30950e4 100644 --- a/src/Pages/Home/Dummy.tsx +++ b/src/Pages/Home/Dummy.tsx @@ -1,14 +1,20 @@ import React, { useState } from "react"; import { useTranslation } from "react-i18next"; import { MathConverter } from "./MathConverter"; +import { BlockMath } from "react-katex"; const Dummy = () => { const [t] = useTranslation(); - - + const sanitizedLatex = "" + const [value, setvalue] = useState("") + const onChange = (e:any)=>{ + setvalue(e.target.value) + } return (
- - + {/* + + {value} + */}
); }; diff --git a/src/Styles/components/LaTeXInput.scss b/src/Styles/components/LaTeXInput.scss index 588b500..1fdd8b7 100644 --- a/src/Styles/components/LaTeXInput.scss +++ b/src/Styles/components/LaTeXInput.scss @@ -19,7 +19,7 @@ height: calc(100% - 44px); word-wrap: break-word; display: flex; - gap: 20px; + gap: 5px; align-items: baseline; align-content: flex-start; flex-wrap: wrap;