mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-10-28 20:55:47 -04:00
less resource-intensive methods of parsing URLs
This commit is contained in:
@@ -2,7 +2,6 @@ import { useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { DefaultSeo, SocialProfileJsonLd } from "next-seo";
|
||||
import * as Fathom from "fathom-client";
|
||||
import urlJoin from "url-join";
|
||||
import { ThemeProvider } from "../contexts/ThemeContext";
|
||||
import Layout from "../components/Layout";
|
||||
import * as config from "../lib/config";
|
||||
@@ -25,7 +24,7 @@ const App = ({ Component, pageProps }: AppProps) => {
|
||||
|
||||
// get this page's URL with full domain, and hack around query parameters and anchors
|
||||
// NOTE: this assumes trailing slashes are enabled in next.config.js
|
||||
const canonical = urlJoin(config.baseUrl, router.pathname === "/" ? "" : router.pathname, "/");
|
||||
const canonical = `${config.baseUrl}${router.pathname === "/" ? "" : router.pathname}/`;
|
||||
|
||||
useEffect(() => {
|
||||
// don't track pageviews on branch/deploy previews and localhost
|
||||
|
||||
Reference in New Issue
Block a user