fix
This commit is contained in:
parent
80dffd913e
commit
0d3856d725
|
|
@ -3,15 +3,15 @@ import { BlockMath } from 'react-katex';
|
||||||
import 'katex/dist/katex.min.css';
|
import 'katex/dist/katex.min.css';
|
||||||
|
|
||||||
const LatexPreview = ({ latex }: { latex: string }) => {
|
const LatexPreview = ({ latex }: { latex: string }) => {
|
||||||
console.log(latex);
|
// console.log(latex);
|
||||||
|
|
||||||
const sanitizedLatex = latex.replace(/\\_/g, '_');
|
// const sanitizedLatex = latex.replace(/\\_/g, '_');
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
|
|
||||||
|
|
||||||
<BlockMath>
|
<BlockMath>
|
||||||
{sanitizedLatex}
|
{latex}
|
||||||
</BlockMath>
|
</BlockMath>
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,8 +29,10 @@ const AddLaTexModal = ({name,setLatex,Latex,setIsModalOpen,isModalOpen,setCurren
|
||||||
setLatex("")
|
setLatex("")
|
||||||
setIsModalOpen(false);
|
setIsModalOpen(false);
|
||||||
}else{
|
}else{
|
||||||
|
setFieldValue(name, oldValue + " $$ " +Latex +" $$ ");
|
||||||
|
setCurrentValue(oldValue + " $$ " +Latex +" $$ ")
|
||||||
setLatex("")
|
setLatex("")
|
||||||
toast.error(t("validation.that_is_not_a_valid_mml"))
|
setIsModalOpen(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ const PersonalDetailsForm = ({isEdit}:{isEdit?:boolean}) => {
|
||||||
placeholder={"_"}
|
placeholder={"_"}
|
||||||
label={"ID Number"}
|
label={"ID Number"}
|
||||||
/>
|
/>
|
||||||
<ValidationField
|
{/* <ValidationField
|
||||||
name={"location_lat"}
|
name={"location_lat"}
|
||||||
placeholder={"_"}
|
placeholder={"_"}
|
||||||
label={"lat"}
|
label={"lat"}
|
||||||
|
|
@ -63,7 +63,7 @@ const PersonalDetailsForm = ({isEdit}:{isEdit?:boolean}) => {
|
||||||
name={"location_lng"}
|
name={"location_lng"}
|
||||||
placeholder={"_"}
|
placeholder={"_"}
|
||||||
label={"lng"}
|
label={"lng"}
|
||||||
/>
|
/> */}
|
||||||
{/* <ValidationField
|
{/* <ValidationField
|
||||||
name={"id_number"}
|
name={"id_number"}
|
||||||
placeholder={"_"}
|
placeholder={"_"}
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ const DrapableTable: React.FC = () => {
|
||||||
const sort_by = Filter?.sort_by ;
|
const sort_by = Filter?.sort_by ;
|
||||||
const response = useGetAllUnit({
|
const response = useGetAllUnit({
|
||||||
subject_id: subject_id,
|
subject_id: subject_id,
|
||||||
pagination: false,
|
isPaginated: false,
|
||||||
name,
|
name,
|
||||||
sort_by,
|
sort_by,
|
||||||
...filterState,
|
...filterState,
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ const DrapableTable: React.FC = () => {
|
||||||
|
|
||||||
const response = useGetAllLesson({
|
const response = useGetAllLesson({
|
||||||
unit_id: unit_id,
|
unit_id: unit_id,
|
||||||
pagination: false,
|
isPaginated: false,
|
||||||
name,
|
name,
|
||||||
sort_by,
|
sort_by,
|
||||||
...filterState,
|
...filterState,
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,20 @@
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { MathConverter } from "./MathConverter";
|
import { MathConverter } from "./MathConverter";
|
||||||
|
import { BlockMath } from "react-katex";
|
||||||
const Dummy = () => {
|
const Dummy = () => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
const sanitizedLatex = ""
|
||||||
|
const [value, setvalue] = useState("")
|
||||||
|
const onChange = (e:any)=>{
|
||||||
|
setvalue(e.target.value)
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className="DummyHomePage">
|
<div className="DummyHomePage">
|
||||||
|
{/* <input onChange={onChange} type="text" />
|
||||||
<MathConverter />
|
<BlockMath>
|
||||||
|
{value}
|
||||||
|
</BlockMath> */}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
height: calc(100% - 44px);
|
height: calc(100% - 44px);
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 20px;
|
gap: 5px;
|
||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
align-content: flex-start;
|
align-content: flex-start;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user