Skip to content

Commit

Permalink
Address the formatting suggestions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Malith-19 committed Nov 8, 2024
1 parent 9930f13 commit 594affc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ import useBrandingPreference from "../../../../hooks/use-branding-preference";
export type UsernameRecoveryChannelSelectionFragmentInterface = IdentifiableComponentInterface;

/**
* Usernam
* e recovery channel selection fragment component for the branding preview of Username Recovery box.
* Username recovery channel selection fragment component for the branding preview of Username Recovery box.
*
* @param props - Props injected to the component.
* @returns Username recovery fragment component.
*/
const UsernameRecoveryChannelSelectionFragment: FunctionComponent<UsernameRecoveryChannelSelectionFragmentInterface> = (
props: UsernameRecoveryChannelSelectionFragmentInterface
): ReactElement => {
const { ["data-componentid"]: componentId } = props;
const { ["data-componentid"]: componentId = "username-recovery-channel-selection" } = props;

const { i18n } = useBrandingPreference();

Expand Down Expand Up @@ -95,12 +94,4 @@ const UsernameRecoveryChannelSelectionFragment: FunctionComponent<UsernameRecove
);
};

/**
* Default proptypes for the component.
*/
UsernameRecoveryChannelSelectionFragment.defaultProps = {
"data-componentid": "username-recovery-channel-selection"
};

export default UsernameRecoveryChannelSelectionFragment;

Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ interface UsernameRecoverySuccessEmailFragmentInterface extends IdentifiableComp
const UsernameRecoverySuccessEmailFragment: FunctionComponent<UsernameRecoverySuccessEmailFragmentInterface> = (
props: UsernameRecoverySuccessEmailFragmentInterface
): ReactElement => {
const { brandingPreference,
["data-componentid"]: componentId
const {
brandingPreference,
["data-componentid"]: componentId = "username-recovery-success-email"
} = props;

const { i18n } = useBrandingPreference();
Expand Down Expand Up @@ -84,12 +85,4 @@ const UsernameRecoverySuccessEmailFragment: FunctionComponent<UsernameRecoverySu
);
};

/**
* Default proptypes for the component.
* See type definitions in interfaces.
*/
UsernameRecoverySuccessEmailFragment.defaultProps = {
"data-componentid": "username-recovery-success-email"
};

export default UsernameRecoverySuccessEmailFragment;
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { useSelector } from "react-redux";
import { CustomTextPreferenceConstants } from "../../../../../constants/custom-text-preference-constants";
import useBrandingPreference from "../../../../../hooks/use-branding-preference";


/**
* Proptypes for the username-recovery-success-sms fragment of login screen skeleton.
*/
Expand All @@ -43,15 +42,14 @@ const UsernameRecoverySuccessSmsFragment: FunctionComponent<UsernameRecoverySucc
): ReactElement => {
const {
brandingPreference,
["data-componentid"]: componentId
["data-componentid"]: componentId = "username-recovery-success-email"
} = props;

const { i18n } = useBrandingPreference();
const supportEmail: string = useSelector((state: AppState) => {
return state.config.deployment.extensions?.supportEmail as string;
});


return (
<div data-componentid={ componentId } className="ui green attached">
<h3 className="ui header text-center slogan-message mt-4 mb-6" >{ i18n(CustomTextPreferenceConstants.
Expand Down Expand Up @@ -87,12 +85,4 @@ const UsernameRecoverySuccessSmsFragment: FunctionComponent<UsernameRecoverySucc
);
};

/**
* Default proptypes for the component.
* See type definitions in interfaces.
*/
UsernameRecoverySuccessSmsFragment.defaultProps = {
"data-componentid": "username-recovery-success-email"
};

export default UsernameRecoverySuccessSmsFragment;
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ const SignInBox: FunctionComponent<SignInBoxInterface> = (
props: SignInBoxInterface
): ReactElement => {

const { brandingPreference,
["data-componentid"]: componentId
const {
brandingPreference,
["data-componentid"]: componentId = "login-screen-skeleton-login-box"
} = props;

const { selectedScreen, selectedScreenVariation } = useBrandingPreference();
Expand Down Expand Up @@ -123,11 +124,4 @@ const SignInBox: FunctionComponent<SignInBoxInterface> = (
);
};

/**
* Default props for the component.
*/
SignInBox.defaultProps = {
"data-componentid": "login-screen-skeleton-login-box"
};

export default SignInBox;
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ export class CustomTextPreferenceConstants {
SMS_OTP: "send.code.via.sms"
}
},

PASSWORD_RESET: {
BUTTON: "password.reset.button",
HEADING: "password.reset.heading"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
boolean error = IdentityManagementEndpointUtil.getBooleanValue(request.getAttribute("error"));
String errorMsg = IdentityManagementEndpointUtil.getStringValue(request.getAttribute("errorMsg"));
List<RecoveryChannel> channels = null;
if(request.getAttribute("channels") != null){
if (request.getAttribute("channels") != null) {
channels = (List<RecoveryChannel>) request.getAttribute("channels");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
screenNames.add("username-recovery-claim");
%>


<%-- Branding Preferences --%>
<jsp:directive.include file="includes/branding-preferences.jsp"/>

Expand Down Expand Up @@ -113,7 +112,6 @@
return;
}
String mobileClaimRegex = null;
String emailClaimRegex = null;
for (Claim claim : claims) {
Expand Down Expand Up @@ -351,7 +349,7 @@
<jsp:include page="includes/footer.jsp"/>
<% } %>

<script type="text/javascript">
<script type="text/javascript">
function goBack() {
window.history.back();
}
Expand Down

0 comments on commit 594affc

Please sign in to comment.