Skip to content

Commit

Permalink
🪟 🐛 Show correct page header for creating connection from connector p…
Browse files Browse the repository at this point in the history
…age (#20986)

* fix check for titleId

* cleanup
  • Loading branch information
teallarson committed Jan 4, 2023
1 parent 8dcca01 commit b9fd113
Showing 1 changed file with 10 additions and 7 deletions.
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];

return (
<>
Expand Down

0 comments on commit b9fd113

Please sign in to comment.