Skip to content

Commit 83dcbde

Browse files
authored
Merge branch 'main' into development
2 parents cd89789 + abdbc2c commit 83dcbde

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

src/components/Error/ErrorSolutions.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function ErrorSolutions({ solutions }) {
1515
return (
1616
<ul id="scroll-solution">
1717
{solutions.split("<").map((solution, index) => (
18-
<li key={index} className="text-sm text-white break-all" >
18+
<li key={index} className="text-sm break-all" >
1919
{solution}
2020
</li>
2121
))}

src/components/Error/ErrorType.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function ErrorType({ type }) {
66
<span
77
className={`before:block mb-3 mt-1 top-2 left-2 h-4 before:absolute before:-inset-1 before:-skew-y-3 relative block before:bg-[${errorTypeColor}]`}
88
>
9-
<span className="relative text-white text-sm -top-1">{type}</span>
9+
<span className="relative text-sm -top-1">{type}</span>
1010
</span>
1111
);
1212
}

src/components/Error/ModalSolutions.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
import React from "react";
1+
import React,{ useContext } from "react";
22
import { MdKeyboardArrowLeft, MdContentCopy } from "react-icons/md";
33
import ErrorSolutions from "./ErrorSolutions";
44
import useColorBorderBox from "../../hooks/useColorBorderBox";
55
import ErrorType from "./ErrorType";
66
import Modal from "react-modal";
77
import toast from "react-hot-toast";
8+
import { ThemeContext } from '../../context/ThemeContext';
89

910
Modal.setAppElement("#root");
1011

1112
const ModalSolutions = ({ isOpen, setOpenModal, error }) => {
1213
const { errorTypeColor } = useColorBorderBox(error.type);
14+
const { theme } = useContext(ThemeContext);
15+
const overlayBackgroundColor = theme === 'dark'
16+
? 'rgba(0, 0, 0, 0.6)'
17+
: 'rgba(0, 0, 0, 0.2)';
1318

1419
return (
1520
<Modal
@@ -23,7 +28,7 @@ const ModalSolutions = ({ isOpen, setOpenModal, error }) => {
2328
id="main-div"
2429
style={{
2530
overlay: {
26-
backgroundColor: "rgba(0, 0 ,0, .6)",
31+
backgroundColor: overlayBackgroundColor,
2732
},
2833
content: {
2934
position: "fixed",

src/pages/Doc/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const DocList = () => {
1212
useEffect(() => {
1313
const fetchDocs = async () => {
1414
try {
15-
const response = await fetch('/docs/index.json');
15+
const response = await fetch('https://github-error-solve.vercel.app/docs/index.json');
1616
if (!response.ok) {
1717
throw new Error(`HTTP error! status: ${response.status}`);
1818
}

0 commit comments

Comments
 (0)