Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const styles = {
mr: 1,
},
wizardButtons: {
mt: 2,
pl: 2,
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import InlineMessage from 'AppComponents/Shared/InlineMessage';
import { ApiContext } from 'AppComponents/Apis/Details/ApiContext';
import { app } from 'Settings';
import SettingsContext from 'AppComponents/Shared/SettingsContext';
import ButtonPanel from './ButtonPanel';

const PREFIX = 'CreateAppStep';
Expand Down Expand Up @@ -77,6 +78,8 @@
currentStep, setCreatedApp, incrementStep, intl, setStepStatus, stepStatuses,
} = props;
const { api: apiObject } = useContext(ApiContext);
const settingsContext = useContext(SettingsContext);

Check warning on line 81 in portals/devportal/src/main/webapp/source/src/app/components/Apis/Details/Credentials/Wizard/CreateAppStep.jsx

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

React Hook "useContext" is called in function "createAppStep" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use".

See more on https://sonarcloud.io/project/issues?id=wso2_apim-apps&issues=AZ0t_N0HxKgDxJTXrqCu&open=AZ0t_N0HxKgDxJTXrqCu&pullRequest=1288
const isApplicationSharingEnabled = Boolean(settingsContext?.settings?.applicationSharingEnabled);

const validateName = (value) => {
if (!value || value.trim() === '') {
Expand Down Expand Up @@ -281,6 +284,7 @@
getAttributeValue={getAttributeValue}
handleDeleteChip={handleDeleteChip}
handleAddChip={handleAddChip}
isApplicationSharingEnabled={isApplicationSharingEnabled}
/>
</Grid>
</Box>
Expand Down
Loading