diff --git a/src/pages/credits/CreditsPage.tsx b/src/pages/credits/CreditsPage.tsx index a8c141e..77209a2 100644 --- a/src/pages/credits/CreditsPage.tsx +++ b/src/pages/credits/CreditsPage.tsx @@ -10,6 +10,7 @@ import { DateTime } from "@comp/DateTime"; import { getAuthorInfo, useHostInfo } from "@utils"; +import { useBreakpoint } from "@utils/hooks"; import "./CreditsPage.less"; @@ -26,6 +27,8 @@ const { authorName, authorURL } = getAuthorInfo(); const host = useHostInfo(); + const bps = useBreakpoint(); + // Replaced by webpack DefinePlugin and git-revision-webpack-plugin const gitVersion: string = __GIT_VERSION__; const gitCommitHash: string = __GIT_COMMIT_HASH__; @@ -58,7 +61,8 @@ className="credits-version-info" size="small" bordered - column={2} + column={{ xs: 1, sm: 1, md: 2 }} + layout={bps.sm ? "horizontal" : "vertical"} > {/* Git describe version */} diff --git a/src/pages/wallets/info/WalletInfoModal.tsx b/src/pages/wallets/info/WalletInfoModal.tsx index 70d29c5..af8397c 100644 --- a/src/pages/wallets/info/WalletInfoModal.tsx +++ b/src/pages/wallets/info/WalletInfoModal.tsx @@ -1,7 +1,7 @@ // Copyright (c) 2020-2021 Drew Lemmy // This file is part of KristWeb 2 under AGPL-3.0. // Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt -import { useState, useCallback, Dispatch, SetStateAction } from "react"; +import { useState, useCallback, useMemo, Dispatch, SetStateAction } from "react"; import { Modal, Button, DescriptionsProps } from "antd"; import { useTranslation } from "react-i18next"; @@ -11,6 +11,8 @@ import { WalletDescSyncedInfo } from "./WalletDescSyncedInfo"; import { WalletDescAdvancedInfo } from "./WalletDescAdvancedInfo"; +import { useBreakpoint } from "@utils/hooks"; + import "./WalletInfoModal.less"; export interface WalletDescProps { @@ -30,14 +32,16 @@ visible, setVisible }: Props): JSX.Element { const { t } = useTranslation(); + const bps = useBreakpoint(); const closeModal = () => setVisible(false); - const descProps: DescriptionsProps = { + const descProps: DescriptionsProps = useMemo(() => ({ column: 1, size: "small", - bordered: true - }; + bordered: true, + layout: bps.sm ? "horizontal" : "vertical" + }), [bps.sm]); return