Skip to content

Commit

Permalink
Refactor from function to const closure
Browse files Browse the repository at this point in the history
  • Loading branch information
TheKnarf committed Apr 2, 2021
1 parent 5d43cd7 commit 2e392db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const Home : React.FC<Props> = ({ bgcolor, textcolor, accentcolor, mdx, appData

useEffect(() => {
if(typeof window !== 'undefined') {
function onHashChange() {
const onHashChange = () => {
const match = window.location.hash.match(/^\#([0-9a-f]{3,6})\-([0-9a-f]{3,6})\-([0-9a-f]{3,6})$/i);
if(match !== null) {
setStyle(makeStyle(
Expand Down

0 comments on commit 2e392db

Please sign in to comment.