Skip to content

Commit

Permalink
muiのエラーの握り潰しを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
MurakawaTakuya committed Dec 23, 2024
1 parent 3ae5bb0 commit b50d356
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 41 deletions.
14 changes: 0 additions & 14 deletions src/Components/GoalModal/CreateGoalModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,20 +86,6 @@ export default function CreateGoalModal({
}
};

// 以下のJoy UIによるエラーを無効化
// Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release. Error Component Stack
try {
const consoleError = console.error;
console.error = (...args) => {
if (args[0]?.includes("Accessing element.ref was removed")) {
return;
}
consoleError(...args);
};
} catch {
console.error("Failed to disable Joy UI error");
}

return (
<Modal
open={open}
Expand Down
14 changes: 0 additions & 14 deletions src/Components/NameUpdate/NameUpdate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,6 @@ export default function NameUpdate() {
}
};

// 以下のJoy UIによるエラーを無効化
// Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release. Error Component Stack
try {
const consoleError = console.error;
console.error = (...args) => {
if (args[0]?.includes("Accessing element.ref was removed")) {
return;
}
consoleError(...args);
};
} catch {
console.error("Failed to disable Joy UI error");
}

return (
<>
<RoundedButton variant="outlined" onClick={() => setOpen(true)}>
Expand Down
13 changes: 0 additions & 13 deletions src/Components/PostModal/PostModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,19 +138,6 @@ export default function PostModal({
}
};

// 以下のJoy UIによるエラーを無効化
try {
const consoleError = console.error;
console.error = (...args) => {
if (args[0]?.includes("Accessing element.ref was removed")) {
return;
}
consoleError(...args);
};
} catch {
console.error("Failed to disable Joy UI error");
}

const VisuallyHiddenInput = styled("input")({
clip: "rect(0 0 0 0)",
clipPath: "inset(50%)",
Expand Down

0 comments on commit b50d356

Please sign in to comment.