-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #248 from Peppermint-Lab/next
cal.com & analytics
- Loading branch information
Showing
5 changed files
with
179 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,34 @@ | ||
import "@/styles/globals.css"; | ||
import * as Fathom from "fathom-client"; | ||
import type { AppProps } from "next/app"; | ||
import { useRouter } from "next/router"; | ||
import { useEffect } from "react"; | ||
|
||
export default function App({ Component, pageProps }: AppProps) { | ||
const router = useRouter(); | ||
|
||
useEffect(() => { | ||
// Initialize Fathom when the app loads | ||
// Example: yourdomain.com | ||
// - Do not include https:// | ||
// - This must be an exact match of your domain. | ||
// - If you're using www. for your domain, make sure you include that here. | ||
Fathom.load("NSYBHOYC", { | ||
includedDomains: ["peppermint.sh"], | ||
}); | ||
|
||
function onRouteChangeComplete() { | ||
Fathom.trackPageview(); | ||
} | ||
// Record a pageview when route changes | ||
router.events.on("routeChangeComplete", onRouteChangeComplete); | ||
|
||
// Unassign event listener | ||
return () => { | ||
router.events.off("routeChangeComplete", onRouteChangeComplete); | ||
}; | ||
}, []); | ||
|
||
//@ts-expect-error | ||
return <Component {...pageProps} />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
//@ts-nocheck | ||
import Cal, { getCalApi } from "@calcom/embed-react"; | ||
import Link from "next/link"; | ||
import { useEffect } from "react"; | ||
|
||
const navigation = [ | ||
// { name: "About Us", href: "#" }, | ||
// { name: "Features", href: "#" }, | ||
{ name: "Github", href: "https://github.com/Peppermint-Lab/peppermint" }, | ||
{ name: "Docs", href: "https://docs.peppermint.sh/" }, | ||
]; | ||
|
||
export default function Contact() { | ||
useEffect(() => { | ||
(async function () { | ||
const cal = await getCalApi(); | ||
cal("ui", { | ||
styles: { branding: { brandColor: "#000000" } }, | ||
hideEventTypeDetails: false, | ||
layout: "month_view", | ||
}); | ||
})(); | ||
}, []); | ||
|
||
return ( | ||
<div className=""> | ||
<header className="bg-white mx-auto text-base max-w-xl mb-36"> | ||
<nav className="flex justify-between py-8" aria-label="Global"> | ||
<div className="flex justify-between lg:flex-1"> | ||
<Link href="/" className="-m-1.5 p-1.5"> | ||
<span className="sm:hidden">🍵</span> | ||
<span className="hidden sm:block font-bold text-xl"> | ||
🍵 Peppermint Labs | ||
</span> | ||
</Link> | ||
</div> | ||
|
||
<div className="flex gap-x-12"> | ||
{navigation.map((item) => ( | ||
<a | ||
key={item.name} | ||
href={item.href} | ||
className="text-sm font-semibold text-gray-900" | ||
> | ||
{item.name} | ||
</a> | ||
))} | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<Cal | ||
calLink="potts/30min" | ||
style={{ width: "100%", height: "100%", overflow: "scroll" }} | ||
config={{ layout: "month_view" }} | ||
/> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -211,6 +211,26 @@ | |
resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.4.tgz#923ca57e173c6b232bbbb07347b1be982f03e783" | ||
integrity sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A== | ||
|
||
"@calcom/[email protected]": | ||
version "1.3.3" | ||
resolved "https://registry.yarnpkg.com/@calcom/embed-core/-/embed-core-1.3.3.tgz#546b758e249a7a8bdf73103c89b385c7a4fc6156" | ||
integrity sha512-bz7S9cvz1JMVWFcJI+dvoOQd5F63YzdQ5gOp1vunob5idje7PoYfiTf6ncMSVeX6vsrJA1oVFD07JMxuYt/d+A== | ||
|
||
"@calcom/embed-react@^1.3.2": | ||
version "1.3.2" | ||
resolved "https://registry.yarnpkg.com/@calcom/embed-react/-/embed-react-1.3.2.tgz#273ecf4d9b10af3ca5b43f7f312798ceb4713611" | ||
integrity sha512-tya/NJQJs0g70RLeeKtfhzF8vX7RzwwWTxlXCojCthuqKdMbx/8WEwZsdDzuJ8OjbPEiLiV3ImO2rgRRftZxNw== | ||
dependencies: | ||
"@calcom/embed-core" "1.3.3" | ||
"@calcom/embed-snippet" "1.1.3" | ||
|
||
"@calcom/[email protected]": | ||
version "1.1.3" | ||
resolved "https://registry.yarnpkg.com/@calcom/embed-snippet/-/embed-snippet-1.1.3.tgz#c442d062320923e326a52afa47e89f3e6b244aa9" | ||
integrity sha512-whtpkc54btyIIDfCXsCP7BN8wE3GGgh8cTX5JiprvbcHaej+OEUcuMuhMcLlBersMADwGENpFrlB6AhSJfEA/Q== | ||
dependencies: | ||
"@calcom/embed-core" "1.3.3" | ||
|
||
"@cspotcode/source-map-support@^0.8.0": | ||
version "0.8.1" | ||
resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz#00629c35a688e05a88b1cda684fb9d5e73f000a1" | ||
|
@@ -4808,6 +4828,11 @@ fastq@^1.6.0, fastq@^1.6.1: | |
dependencies: | ||
reusify "^1.0.4" | ||
|
||
fathom-client@^3.6.0: | ||
version "3.6.0" | ||
resolved "https://registry.yarnpkg.com/fathom-client/-/fathom-client-3.6.0.tgz#f46d8949cf73df89998a8793e51ad2c21efd703b" | ||
integrity sha512-/mrgmVvpw4HqDCcqUfPulERhONKgnJGL74RAxfqKDuRQ+7w9lKoTHMzqBWE7WNBvmsgZEthQWJFOWOEjv+T3gA== | ||
|
||
fflate@^0.4.1: | ||
version "0.4.8" | ||
resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae" | ||
|