Skip to content

Commit

Permalink
STCOR-938: remove remaining references to stripes.isEureka
Browse files Browse the repository at this point in the history
  • Loading branch information
aidynoJ committed Jan 30, 2025
1 parent 2049911 commit b892e34
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/Pluggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const Pluggable = (props) => {
}

return cached;
// props.stripes is not stable on each re-render, which causes an infinite trigger
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [plugins]);

if (cachedPlugins.length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class CreateResetPasswordControl extends Component {
// This part of the path is optional (hence the ?) and can instead be placed in the URL param `resetToken`
// to allow for keys longer than the URL length restriction of 2048 characters.
const resetToken = token ?? getLocationQuery(location)?.resetToken;
const interfacePath = stripes.config.isEureka ? 'users-keycloak' : 'bl-users';
const interfacePath = stripes.okapi.authnUrl ? 'users-keycloak' : 'bl-users';
const path = `${url}/${interfacePath}/password-reset/${isValidToken ? 'reset' : 'validate'}`;

fetch(path, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe('CreateResetPasswordControl', () => {
clone: jest.fn(),
config: {},
okapi: {
url: 'http://test'
authnUrl: 'http://test'
},
hasInterface: jest.fn().mockReturnValue(true),
store: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const PasswordSuccessfullyChanged = ({ history, stripes }) => {

const handleRedirectClick = () => {
// If using Eureka, go to base URL. Otherwise, if using Okapi then go to /login
if (stripes.config.isEureka) {
if (stripes.okapi.authnUrl) {
history.push('/');
} else {
history.push('/login');
Expand Down

0 comments on commit b892e34

Please sign in to comment.