Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change base URL for development #271

Merged
merged 2 commits into from
Nov 20, 2024
Merged
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
4 changes: 2 additions & 2 deletions src/helpers/partnersReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export enum partnersActions {
'TOGGLE_VALIDATORS',
'TOGGLE_ON_MESSENGER',
'UPDATE_BUSINESS_FIELDS_FROM_API',

}

export interface ActionType {
Expand Down Expand Up @@ -88,9 +87,10 @@ export const partnersReducer = (
case partnersActions.TOGGLE_CATEGORY:
const updatedBusinessField = state.businessField.map(group => {
if (group.category === action.payload) {
const isAllSelected = group.fields.every(field => field.active)
const updatedFields = group.fields.map(field => ({
...field,
active: !field.active,
active: isAllSelected ? false : true, // Toggle between all selected and all deselected
}))
return { ...group, fields: updatedFields }
}
Expand Down
2 changes: 1 addition & 1 deletion src/redux/services/partners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function getServiceName(fullName: unknown): string {
const getBaseUrl = () => {
const currentPath = typeof window !== 'undefined' ? window.location.hostname : ''
if (currentPath === 'localhost' || currentPath.includes('dev')) {
return BASE_URLS.prod
return BASE_URLS.dev
} else if (currentPath) {
return BASE_URLS.prod
} else {
Expand Down
Loading