refactor: extract back button logic into dedicated wrapper component (#25093)
* refactor: extract back button logic into dedicated wrapper component * Added changeset
This commit is contained in:
1 parent
e6e67848b3
commit
3e7a848769
6 files changed
+59
-23
No files matched your search
+5
-6
@@ -1,7 +1,7 @@
|
||||
import type { PageProps } from "app/_types";
|
||||
import { getTranslate, _generateMetadata } from "app/_utils";
|
||||
import { _generateMetadata, getTranslate } from "app/_utils";
|
||||
|
||||
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
|
||||
import SettingsHeaderWithBackButton from "@calcom/features/settings/appDir/SettingsHeaderWithBackButton";
|
||||
import { WebhookRepository } from "@calcom/features/webhooks/lib/repository/WebhookRepository";
|
||||
import { EditWebhookView } from "@calcom/features/webhooks/pages/webhook-edit-view";
|
||||
import { APP_NAME } from "@calcom/lib/constants";
|
||||
@@ -24,13 +24,12 @@ const Page = async ({ params: _params }: PageProps) => {
|
||||
const webhook = await webhookRepository.findByWebhookId(id);
|
||||
|
||||
return (
|
||||
<SettingsHeader
|
||||
<SettingsHeaderWithBackButton
|
||||
title={t("edit_webhook")}
|
||||
description={t("add_webhook_description", { appName: APP_NAME })}
|
||||
borderInShellHeader={true}
|
||||
backButton>
|
||||
borderInShellHeader={true}>
|
||||
<EditWebhookView webhook={webhook} />
|
||||
</SettingsHeader>
|
||||
</SettingsHeaderWithBackButton>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user