Skip to content

Commit

Permalink
fix scrollbar for donaters list
Browse files Browse the repository at this point in the history
  • Loading branch information
stCarolas committed Dec 27, 2023
1 parent cc402ff commit 808f075
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/DonatersTopList/DonatersTopList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ import { findSetting } from "../utils";
import { setupCommandListener, subscribe } from "../../socket";
import FontImport from "../FontImport/FontImport";

const overflowHiddenForRootElement = (
<style
dangerouslySetInnerHTML={{
__html: `#root {overflow: hidden;}`,
}}
/>
);

export default function DonatersTopList({}: {}) {
const [donaters, setDonaters] = useState(new Map());
const { recipientId, settings, conf, widgetId } = useLoaderData();
Expand Down Expand Up @@ -46,14 +54,15 @@ export default function DonatersTopList({}: {}) {
const color = findSetting(settings, "color", "white");
const textStyle = {
fontSize: fontSize ? fontSize + "px" : "unset",
lineHeight: fontSize ? fontSize + "px" : "unset",
lineHeight: fontSize ? fontSize + "px" : "unset",
fontFamily: font ? font : "unset",
color: color,
};

return (
<>
<FontImport font={font} />
{overflowHiddenForRootElement}
{"All" === type && (
<div className="donaters-list" style={textStyle}>
{donaters &&
Expand Down

0 comments on commit 808f075

Please sign in to comment.