autobrr/web/src/components/debug.tsx
stacksmash76 b6ba23d0ee
fix(web): download client table overflow, filter alerts, dubious wording (#521)
* fix table overflow in settings -> download client

* fixed uneven line height in CellLine component

* filters/details: rename "Cancel" to "Reset form values"
Added log level and log path to Application settings.
Added column truncation to Download Client settings.

* feat: change settings debug toggle wording

* fix: typo in irc add form
2022-11-10 12:27:09 +01:00

22 lines
559 B
TypeScript

import { FC } from "react";
import { SettingsContext } from "../utils/Context";
interface DebugProps {
values: unknown;
}
const DEBUG: FC<DebugProps> = ({ values }) => {
const settings = SettingsContext.useValue();
if (process.env.NODE_ENV !== "development" || !settings.debug) {
return null;
}
return (
<div className="w-full p-2 flex flex-col mt-6 bg-gray-100 dark:bg-gray-900">
<pre className="dark:text-gray-400 break-all whitespace-pre-wrap">{JSON.stringify(values, null, 2)}</pre>
</div>
);
};
export default DEBUG;