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

🪟 🐛 Show correct page header for creating connection from connector page #20986

Merged
merged 3 commits into from
Jan 4, 2023
Merged
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 @@ -211,13 +211,16 @@ export const CreationFormPage: React.FC = () => {
},
];

const titleId: string = (
{
[EntityStepsTypes.CONNECTION]: "connection.newConnectionTitle",
[EntityStepsTypes.DESTINATION]: "destinations.newDestinationTitle",
[EntityStepsTypes.SOURCE]: "sources.newSourceTitle",
} as Record<EntityStepsTypes, string>
)[type];
const titleId: string =
currentStep === "createConnection"
? "connection.newConnectionTitle"
: (
{
[EntityStepsTypes.CONNECTION]: "connection.newConnectionTitle",
[EntityStepsTypes.DESTINATION]: "destinations.newDestinationTitle",
[EntityStepsTypes.SOURCE]: "sources.newSourceTitle",
} as Record<EntityStepsTypes, string>
)[type];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works but I hate how this is handled across this component.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. I started looking at cleaning up some of the types and names here, but it snowballed and got pretty out of scope pretty quickly.


return (
<>
Expand Down