Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mmiller42 committed Jul 2, 2024
1 parent 8762c3f commit 93c62f5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
4 changes: 0 additions & 4 deletions example/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ module.exports = {
type: "asset/source",
});

console.log(webpackConfig.output);
const n = Date.now();
while (Date.now() < n + 1000) {}

return webpackConfig;
},
devServer: (devServerConfig) => {
Expand Down
20 changes: 1 addition & 19 deletions src/common/route/ApiError.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,11 @@ import { ApiError } from "../../types";

export default function ApiError({ error }: { error: null | ApiError }) {
const { darkMode } = useGlobalContext();
// const styles = useMemo(() => {
// return {
// responseStatus: darkMode
// ? "bg-gray-800 border-gray-900"
// : "bg-gray-200 border-gray-400",
// textColor: darkMode ? "text-white" : "",
// };
// }, [darkMode]);

if (!error?.response) {
return null;
}

// let responseColor;
// if (
// error?.response?.status &&
// error.response.status >= 200 &&
// error.response.status < 300
// ) {
// responseColor = Helpers.colors.green;
// } else if (error?.response?.status && error.response.status >= 400) {
// responseColor = Helpers.colors.red;
// }

const isJSON = error.response.data && isObject(error.response.data);

return (
Expand Down

0 comments on commit 93c62f5

Please sign in to comment.