-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Link to navigate to object settings is broken #6213
Comments
To fix the broken link for navigating to object settings, update the URL construction to use the
<SettingsObjectItemTableRow
key={activeObjectMetadataItem.namePlural}
objectItem={activeObjectMetadataItem}
action={<StyledIconChevronRight size={theme.icon.size.md} stroke={theme.icon.stroke.sm} />}
to={`/settings/objects/${getObjectSlug(activeObjectMetadataItem)}`}
/>
<SettingsObjectFieldItemTableRow
key={activeMetadataField.id}
identifierType={getFieldIdentifierType(activeMetadataField, activeObjectMetadataItem)}
variant={activeObjectMetadataItem.isCustom ? 'identifier' : 'field-type'}
fieldMetadataItem={activeMetadataField}
isRemoteObjectField={activeObjectMetadataItem.isRemote}
to={`./${getFieldSlug(activeMetadataField)}`}
ActionIcon={
<SettingsObjectFieldActiveActionDropdown
isCustomField={!!activeMetadataField.isCustom}
scopeKey={activeMetadataField.id}
onEdit={() => navigate(`./${getFieldSlug(activeMetadataField)}`)}
onSetAsLabelIdentifier={canBeSetAsLabelIdentifier ? () => handleSetLabelIdentifierField(activeMetadataField) : undefined}
onDeactivate={isLabelIdentifier ? undefined : () => handleDisableField(activeMetadataField)}
/>
}
/> This ensures that the URLs are correctly formatted and navigates to the appropriate object settings page. References/packages/twenty-front/src/pages/settings/data-model/SettingsObjects.tsx
|
@FelixMalfait can i work on this issue |
Ah, sry @saloni0419 Ive fixed this in the meantime #6228 hope you dont mind and will take another issue 😉 |
fixes #6213 fixed the mentioned case + tried to find&fix other possible broken links
Steps to reproduce:
We probably hardcoded the url and passed the wrong variable. We should let the Router build the url if possible and share a common logic between the 2 page. Do something as clean/robust as possible.
The text was updated successfully, but these errors were encountered: