Skip to content

Commit cc095bb

Browse files
committed
fix: footer links
1 parent b7ec87b commit cc095bb

2 files changed

Lines changed: 31 additions & 14 deletions

File tree

src/theme/Footer/_config.ts

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,33 +71,47 @@ export const getNavLinks = (
7171
url: "https://www.leancloud.cn/pricing/index.html",
7272
},
7373
{
74-
label: "下载",
75-
url: "https://leancloud.cn/docs/sdk_down.html",
74+
label: "快速开始",
75+
url: "/sdk/start/guide/",
7676
},
7777
{
7878
label: "常见问题",
79-
url: "https://leancloud.cn/docs/faq.html",
79+
url: "/sdk/start/faq/",
8080
},
8181
{
8282
label: "技术支持",
8383
url: "https://leanticket.cn/",
8484
},
8585
{
8686
label: "健康状态",
87-
url: "https://leancloudstatus.com/",
87+
url: "https://status.leancloud.cn/",
88+
},
89+
];
90+
const NAV_LINKS_LEANCLOUD_GLOBAL: (NavLinkInternal | NavLinkExternal)[] = [
91+
{
92+
label: "Pricing",
93+
url: "https://leancloud.app/pricing",
8894
},
8995
{
90-
label: "社区",
91-
url: "https://forum.leancloud.cn/",
96+
label: "Quick Start",
97+
url: "/sdk/start/guide/",
9298
},
9399
{
94-
label: "博客",
95-
url: "https://leancloudblog.com/",
100+
label: "FAQ",
101+
url: "/sdk/start/faq/",
102+
},
103+
{
104+
label: "Support",
105+
url: "https://ticket.leancloud.app",
106+
},
107+
{
108+
label: "Status",
109+
url: "https://leancloudstatus.com/",
96110
},
97111
];
98112

99113
if (brand === "leancloud") {
100-
return NAV_LINKS_LEANCLOUD_CN;
114+
return region === "cn" ? NAV_LINKS_LEANCLOUD_CN : NAV_LINKS_LEANCLOUD_GLOBAL;
101115
} else {
102116
const NAV_LINKS = region === "cn" ? NAV_LINKS_TDS_CN : NAV_LINKS_TDS_GLOBAL;
103117
return NAV_LINKS.map((link, index) => ({
@@ -165,7 +179,11 @@ export const getLicenceLinks = (
165179
];
166180

167181
if (brand === "leancloud") {
168-
return LICENCE_LINKS_LEANCLOUD_CN;
182+
if (region === "cn") {
183+
return LICENCE_LINKS_LEANCLOUD_CN;
184+
} else {
185+
return [];
186+
}
169187
} else {
170188
if (region === "cn") {
171189

src/theme/Footer/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import Logo from "@theme/Logo";
66
import { BRAND, REGION } from "../../constants/env";
77
import { getNavLinks, getLicenceLinks } from "./_config";
88

9-
function getCopyrightNotice(brand: string): string {
9+
function getCopyrightNotice(region: string): string {
1010
const year = new Date().getFullYear();
11-
const company =
12-
brand === "leancloud" ? "美味书签(上海)信息技术有限公司" : "TapTap";
11+
const company = region === "cn" ? "美味书签(上海)信息技术有限公司" : "LeanCloud";
1312
return ${year} ${company}`;
1413
}
1514

@@ -55,7 +54,7 @@ function Footer() {
5554
</section>
5655

5756
<section className={styles.info}>
58-
<div>{getCopyrightNotice(BRAND)}</div>
57+
<div>{getCopyrightNotice(REGION)}</div>
5958
</section>
6059
</section>
6160
</div>

0 commit comments

Comments
 (0)