fix: setup page when alby is not setup yet
parent
8ef09fcfd5
commit
dd6fe5a385
|
@ -21,11 +21,18 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
|
|||
},
|
||||
});
|
||||
|
||||
const props: IAlbySetupProps = {};
|
||||
const props: IAlbySetupProps = {
|
||||
email: null,
|
||||
lightningAddress: null,
|
||||
};
|
||||
if (credentials?.key) {
|
||||
const { account_lightning_address, account_email } = credentials.key;
|
||||
props.email = account_email;
|
||||
props.lightningAddress = account_lightning_address;
|
||||
if (account_lightning_address) {
|
||||
props.lightningAddress = account_lightning_address;
|
||||
}
|
||||
if (account_email) {
|
||||
props.email = account_email;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
|
@ -12,8 +12,8 @@ import { Info } from "@calcom/ui/components/icon";
|
|||
import { albyCredentialKeysSchema } from "../../lib/albyCredentialKeysSchema";
|
||||
|
||||
export interface IAlbySetupProps {
|
||||
email?: string;
|
||||
lightningAddress?: string;
|
||||
email: string | null;
|
||||
lightningAddress: string | null;
|
||||
}
|
||||
|
||||
export default function AlbySetup(props: IAlbySetupProps) {
|
||||
|
|
Loading…
Reference in New Issue