Added anchor tags to faq links

This commit is contained in:
Mitchell McCaffrey 2020-05-03 18:30:01 +10:00
parent 60059ff447
commit 9e4cbbfb75
7 changed files with 25 additions and 10 deletions

View File

@ -16,6 +16,7 @@
"react-dom": "^16.13.0",
"react-modal": "^3.11.2",
"react-router-dom": "^5.1.2",
"react-router-hash-link": "^1.2.2",
"react-scripts": "3.4.0",
"shortid": "^2.2.15",
"simple-peer": "^9.6.2",

View File

@ -1,6 +1,6 @@
import React from "react";
import { Link as ThemeLink } from "theme-ui";
import { Link as RouterLink } from "react-router-dom";
import { HashLink as RouterLink } from "react-router-hash-link";
function Link({ to, ...rest }) {
return (

View File

@ -87,8 +87,8 @@ function MapTiles({
p={1}
>
<Text as="p" variant="body2">
Map saving is unavailable. See <Link to="/faq">FAQ</Link> for more
information.
Map saving is unavailable. See <Link to="/faq#saving">FAQ</Link> for
more information.
</Text>
</Box>
)}

View File

@ -22,7 +22,7 @@ function StartStreamButton({ onStreamStart, onStreamEnd, stream }) {
Browser not supported for audio sharing.
<br />
<br />
See <Link to="/faq">FAQ</Link> for more information.
See <Link to="/faq#radio">FAQ</Link> for more information.
</Text>
</Box>
);
@ -35,7 +35,7 @@ function StartStreamButton({ onStreamStart, onStreamEnd, stream }) {
Ensure "Share audio" is selected when sharing.
<br />
<br />
See <Link to="/faq">FAQ</Link> for more information.
See <Link to="/faq#radio">FAQ</Link> for more information.
</Text>
</Box>
);

View File

@ -26,7 +26,7 @@ function FAQ() {
<Text mb={2} variant="heading" as="h1" sx={{ fontSize: 5 }}>
Frequently Asked Questions
</Text>
<Text my={1} variant="heading" as="h2" sx={{ fontSize: 3 }}>
<Text my={1} variant="heading" as="h2" sx={{ fontSize: 3 }} id="radio">
Using Radio (experimental)
</Text>
<Text my={1} variant="heading" as="h3">
@ -61,7 +61,13 @@ function FAQ() {
</ExternalLink>{" "}
on the Mozilla Developer Network.
</Text>
<Text my={1} variant="heading" as="h2" sx={{ fontSize: 3 }}>
<Text
my={1}
variant="heading"
as="h2"
sx={{ fontSize: 3 }}
id="connection"
>
Connection
</Text>
<Text my={1} variant="heading" as="h3">
@ -131,7 +137,7 @@ function FAQ() {
</ExternalLink>
.
</Text>
<Text my={1} variant="heading" as="h2" sx={{ fontSize: 3 }}>
<Text my={1} variant="heading" as="h2" sx={{ fontSize: 3 }} id="saving">
Saving
</Text>
<Text my={1} variant="heading" as="h3">

View File

@ -501,7 +501,8 @@ function Game() {
<Banner isOpen={!!peerError} onRequestClose={() => setPeerError(null)}>
<Box p={1}>
<Text as="p" variant="body2">
{peerError} See <Link to="/faq">FAQ</Link> for more information.
{peerError} See <Link to="/faq#connection">FAQ</Link> for more
information.
</Text>
</Box>
</Banner>

View File

@ -8843,7 +8843,7 @@ prompts@^2.0.1:
kleur "^3.0.3"
sisteransi "^1.0.3"
prop-types@^15.5.10, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
@ -9102,6 +9102,13 @@ react-router-dom@^5.1.2:
tiny-invariant "^1.0.2"
tiny-warning "^1.0.0"
react-router-hash-link@^1.2.2:
version "1.2.2"
resolved "https://registry.yarnpkg.com/react-router-hash-link/-/react-router-hash-link-1.2.2.tgz#7a0ad5e925d49596d19554de8bc6c554ce4f8099"
integrity sha512-LBthLVHdqPeKDVt3+cFRhy15Z7veikOvdKRZRfyBR2vjqIE7rxn+tKLjb6DOmLm6JpoQVemVDnxQ35RVnEHdQA==
dependencies:
prop-types "^15.6.0"
react-router@5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.1.2.tgz#6ea51d789cb36a6be1ba5f7c0d48dd9e817d3418"