diff --git a/components/lightning-auth.js b/components/lightning-auth.js index 8f7118f4b..bfb3c9289 100644 --- a/components/lightning-auth.js +++ b/components/lightning-auth.js @@ -45,18 +45,18 @@ function QrAuth ({ k1, encodedUrl, callbackUrl, multiAuth }) { ) } -function LightningExplainer ({ text, children }) { +function LightningExplainer ({ text, children, backButton, md = 12, lg = 6 }) { const router = useRouter() return (
-
router.back()}>
+ {backButton &&
router.back()}>
}

{text || 'Login'} with Lightning

This is the most private way to use Stacker News. Just open your Lightning wallet and scan the QR code.
- + - + {children} @@ -101,9 +101,9 @@ function LightningExplainer ({ text, children }) { ) } -export function LightningAuthWithExplainer ({ text, callbackUrl, multiAuth }) { +export function LightningAuthWithExplainer ({ text, callbackUrl, multiAuth, backButton = true, md = 12, lg = 6 }) { return ( - + ) diff --git a/pages/settings/index.js b/pages/settings/index.js index cf3b2c6fe..9fb98bf31 100644 --- a/pages/settings/index.js +++ b/pages/settings/index.js @@ -9,7 +9,7 @@ import { gql, useMutation, useQuery } from '@apollo/client' import { getGetServerSideProps } from '@/api/ssrApollo' import LoginButton from '@/components/login-button' import { signIn } from 'next-auth/react' -import { LightningAuth } from '@/components/lightning-auth' +import { LightningAuthWithExplainer } from '@/components/lightning-auth' import { SETTINGS, SET_SETTINGS } from '@/fragments/users' import { useRouter } from 'next/router' import Info from '@/components/info' @@ -706,7 +706,7 @@ function QRLinkButton ({ provider, unlink, status }) { ? unlink : () => showModal(onClose =>
- +
) return (