From 9a390eafebd252bd6765f14d30f7b3ec9b2a1ad3 Mon Sep 17 00:00:00 2001
From: apple502j <33279053+apple502j@users.noreply.github.com>
Date: Fri, 6 Aug 2021 02:55:11 +0900
Subject: [PATCH] Move FAQ page to /faq
---
src/components/footer/www/footer.jsx | 2 +-
src/routes.json | 10 ++++++++--
src/views/about/about.jsx | 2 +-
src/views/contact-us/contact-us.jsx | 4 ++--
src/views/parents/parents.jsx | 2 +-
src/views/preview/unsupported-browser.jsx | 2 +-
src/views/splash/presentation.jsx | 2 +-
src/views/terms/terms.jsx | 2 +-
test/integration/footer-links.test.js | 2 +-
9 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/src/components/footer/www/footer.jsx b/src/components/footer/www/footer.jsx
index 5603f76b2..f1a53be8e 100644
--- a/src/components/footer/www/footer.jsx
+++ b/src/components/footer/www/footer.jsx
@@ -138,7 +138,7 @@ const Footer = props => (
-
+
diff --git a/src/routes.json b/src/routes.json
index 6f7b86e4e..7c0059c39 100644
--- a/src/routes.json
+++ b/src/routes.json
@@ -151,8 +151,8 @@
},
{
"name": "faq",
- "pattern": "^/info/faq/?(\\?.*)?$",
- "routeAlias": "/info/(cards|credits|faq)/?$",
+ "pattern": "^/faq/?(\\?.*)?$",
+ "routeAlias": "/faq",
"view": "faq/faq",
"title": "FAQ"
},
@@ -392,6 +392,12 @@
"routeAlias": "/info/(cards|credits|faq|donate)/?$",
"redirect" : "/credits"
},
+ {
+ "name" : "faq-redirect",
+ "pattern": "^/info/faq/?$",
+ "routeAlias": "/info/(cards|credits|faq|donate)/?$",
+ "redirect" : "/faq"
+ },
{
"name": "donate-redirect",
"pattern": "^/info/donate/?",
diff --git a/src/views/about/about.jsx b/src/views/about/about.jsx
index 52fe88eb9..1b38c04e9 100644
--- a/src/views/about/about.jsx
+++ b/src/views/about/about.jsx
@@ -175,7 +175,7 @@ const About = () => (
-
+
diff --git a/src/views/contact-us/contact-us.jsx b/src/views/contact-us/contact-us.jsx
index 03b9e95fd..2e57f148a 100644
--- a/src/views/contact-us/contact-us.jsx
+++ b/src/views/contact-us/contact-us.jsx
@@ -57,7 +57,7 @@ class ContactUs extends React.Component {
+
)}}
/>
@@ -115,7 +115,7 @@ class ContactUs extends React.Component {
-
+
{this.state.showForm && (
diff --git a/src/views/parents/parents.jsx b/src/views/parents/parents.jsx
index 362de0a38..a8851d53e 100644
--- a/src/views/parents/parents.jsx
+++ b/src/views/parents/parents.jsx
@@ -114,7 +114,7 @@ const Landing = () => (
id="parents.faqMoreAndAsk"
values={{
faqPage: (
-
+
diff --git a/src/views/preview/unsupported-browser.jsx b/src/views/preview/unsupported-browser.jsx
index 1d16fac7d..8a5c5efcb 100644
--- a/src/views/preview/unsupported-browser.jsx
+++ b/src/views/preview/unsupported-browser.jsx
@@ -35,7 +35,7 @@ const UnsupportedBrowser = () => (
faqLink: (
diff --git a/src/views/splash/presentation.jsx b/src/views/splash/presentation.jsx
index b65dde823..45f153ace 100644
--- a/src/views/splash/presentation.jsx
+++ b/src/views/splash/presentation.jsx
@@ -389,7 +389,7 @@ class SplashPresentation extends React.Component { // eslint-disable-line react/
>
Confirm your email
{' '}to enable sharing.{' '}
-
+
Having trouble?
,
diff --git a/src/views/terms/terms.jsx b/src/views/terms/terms.jsx
index b372a6489..203cd2ebf 100644
--- a/src/views/terms/terms.jsx
+++ b/src/views/terms/terms.jsx
@@ -265,7 +265,7 @@ const Terms = () => (
5.3 The source code for Scratch 1.4 is available for download and subject
- to the copyright notice as indicated on the Scratch FAQ
+ to the copyright notice as indicated on the Scratch FAQ
{' '}page.
diff --git a/test/integration/footer-links.test.js b/test/integration/footer-links.test.js
index 1e2eadd2f..7de3f475d 100644
--- a/test/integration/footer-links.test.js
+++ b/test/integration/footer-links.test.js
@@ -93,7 +93,7 @@ describe('www-integration footer links', () => {
await clickText('FAQ');
let url = await driver.getCurrentUrl();
let pathname = (new URL(url)).pathname;
- expect(pathname).toMatch(/^\/info\/faq\/?$/);
+ expect(pathname).toMatch(/^\/faq\/?$/);
});
test('click Download link', async () => {