make back button link to previous page

This commit is contained in:
LBlend committed 2021-08-05 17:51:01 +02:00
1 parent 9437ac405f
commit 765c6a42cd
2 files changed
+15 -2

No files matched your search

+5 -2
View File
@@ -5,10 +5,13 @@ import { Link } from "gatsby"
import { FaArrowLeft } from "react-icons/fa"
const Back = () => (
<Link to="/" className={styles.container}>
<button
className={`${styles.container} ${styles.button}`}
onClick={() => window.history.back()}
>
<FaArrowLeft />
<p>Tilbake</p>
</Link>
</button>
)
export default Back
+10
View File
@@ -4,3 +4,13 @@
justify-content: center;
gap: 0.5rem;
}
.button {
background: none;
border: none;
color: var(--link-color);
}
.button:hover,
.button *:hover {
color: var(--link-color-hover);
}