Skip to content

Commit 0776657

Browse files
fix: made playground page use same layout as other pages (calcom#25216)
* fix: made playground page use same layout as other pages * update: added feature key * Change link display from table to list format Refactor page layout to use a list instead of a table for links. --------- Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
1 parent 3cf7266 commit 0776657

2 files changed

Lines changed: 33 additions & 15 deletions

File tree

  • apps/web
    • app/(use-page-wrapper)/settings/(admin-layout)/admin/playground
    • public/static/locales/en
Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import { _generateMetadata, getTranslate } from "app/_utils";
12
import Link from "next/link";
23

4+
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
5+
36
const LINKS = [
47
{
58
title: "Routing Funnel",
@@ -15,20 +18,32 @@ const LINKS = [
1518
},
1619
];
1720

18-
export default function Page() {
19-
return (
20-
<div>
21-
<h1 className="text-3xl font-bold">Playground</h1>
21+
export const generateMetadata = async () =>
22+
await _generateMetadata(
23+
(t) => t("playground"),
24+
(t) => t("admin_playground_description"),
25+
undefined,
26+
undefined,
27+
"/settings/admin/playground"
28+
);
2229

23-
<ul className="mt-8">
24-
{LINKS.map((link) => (
25-
<li key={link.title}>
26-
<Link href={link.href} className="list-item list-disc font-medium underline">
27-
{link.title}
28-
</Link>
29-
</li>
30-
))}
31-
</ul>
32-
</div>
30+
const Page = async () => {
31+
const t = await getTranslate();
32+
return (
33+
<SettingsHeader title={t("playground")} description={t("admin_playground_description")}>
34+
<div>
35+
<ul className="mt-8">
36+
{LINKS.map((link) => (
37+
<li key={link.title}>
38+
<Link href={link.href} className="list-item list-disc font-medium underline">
39+
{link.title}
40+
</Link>
41+
</li>
42+
))}
43+
</ul>
44+
</div>
45+
</SettingsHeader>
3346
);
34-
}
47+
};
48+
49+
export default Page;

apps/web/public/static/locales/en/common.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2088,6 +2088,9 @@
20882088
"disable_app": "Disable App",
20892089
"disable_app_description": "Disabling this app could cause problems with how your users interact with Cal",
20902090
"edit_keys": "Edit Keys",
2091+
"feature": "Feature",
2092+
"playground": "Playground",
2093+
"admin_playground_description": "Admin playground for testing out new features and functionalities.",
20912094
"admin_apps_description": "Enable apps for your instance of Cal",
20922095
"admin_users_description": "A list of all the users in your account including their name, title, email and role.",
20932096
"admin_users_add_description": "Here you can add a new user.",

0 commit comments

Comments
 (0)