Skip to content

Commit

Permalink
fix(page3): fix Welcome keyname props issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed May 3, 2023
1 parent accd043 commit 40bee01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/page3/src/control/Welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { PropsWithChildren } from 'react';
import { Block, BlockProps, BlockTagType } from 'react-login-page';

export const Welcome = <T extends BlockTagType>(props: PropsWithChildren<Partial<BlockProps<T>>>) => {
const { keyname, name = 'title', tagName = 'section', ...elmProps } = props;
const { keyname = 'welcome', tagName = 'section', ...elmProps } = props;
if (!elmProps.children) {
elmProps.children = 'Welcome back! Log in to your account.';
}
return <Block tagName={tagName} {...elmProps} keyname={keyname || name} />;
return <Block tagName={tagName} {...elmProps} keyname={keyname} />;
};

0 comments on commit 40bee01

Please sign in to comment.