Skip to content

Commit a93e704

Browse files
authored
Merge pull request #724 from zackproser/vibe-coding-premium
Vibe coding premium
2 parents e82f6ce + cb5f1f2 commit a93e704

37 files changed

+964
-221
lines changed

next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import nextMDX from "@next/mdx";
22
import remarkGfm from "remark-gfm";
33
import remarkToc from "remark-toc";
4+
import remarkMermaid from "remark-mermaid";
45
import rehypePrism from "@mapbox/rehype-prism";
56
import rehypeSlug from 'rehype-slug';
67
import rehypeAutolinkHeadings from 'rehype-autolink-headings';

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
"rehype-autolink-headings": "^7.1.0",
129129
"rehype-slug": "^6.0.0",
130130
"remark-gfm": "^3.0.1",
131+
"remark-mermaid": "^0.2.0",
131132
"remark-toc": "^9.0.0",
132133
"sharp": "^0.34.1",
133134
"source-map": "^0.7.4",
@@ -152,6 +153,7 @@
152153
"@types/nodemailer": "^6.4.17",
153154
"@types/react-dom": "^18.2.19",
154155
"@types/uuid": "^10.0.0",
156+
"concurrently": "^8.2.2",
155157
"eslint": "^8.45.0",
156158
"eslint-config-next": "^13.4.16",
157159
"jest": "^29.7.0",
@@ -161,7 +163,6 @@
161163
"prisma": "^6.4.1",
162164
"source-map-js": "^1.2.1",
163165
"ts-node": "^10.9.2",
164-
"tsx": "^4.19.3",
165-
"concurrently": "^8.2.2"
166+
"tsx": "^4.19.3"
166167
}
167168
}

pnpm-lock.yaml

Lines changed: 309 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
1.19 MB
Binary file not shown.

public/videos/install-homebrew.mp4

1.5 MB
Binary file not shown.

src/components/ShareButton.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { Button } from '@/components/Button'
66
import { ClipboardIcon, CheckIcon } from '@heroicons/react/24/outline' // Using Heroicons for feedback
77
import clsx from 'clsx'
88

9-
export default function ShareButton({ buttonText = 'Share this guide', copiedText = 'Link Copied!', ...props }) {
9+
export default function ShareButton({ buttonText = 'Share this guide', copiedText = 'Link Copied!', onCopy, ...props }) {
1010
const [isCopied, setIsCopied] = useState(false)
1111
const pathname = usePathname()
1212
const [fullUrl, setFullUrl] = useState('')
@@ -24,6 +24,9 @@ export default function ShareButton({ buttonText = 'Share this guide', copiedTex
2424
try {
2525
await navigator.clipboard.writeText(fullUrl)
2626
setIsCopied(true)
27+
if (typeof onCopy === 'function') {
28+
onCopy()
29+
}
2730
setTimeout(() => {
2831
setIsCopied(false)
2932
}, 2000) // Reset icon/text after 2 seconds
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'use client'
2+
import ShareButton from './ShareButton'
3+
import { track } from '@vercel/analytics'
4+
5+
export default function ShareButtonTracked(props) {
6+
return (
7+
<ShareButton
8+
{...props}
9+
onCopy={() => {
10+
track('share-guide', { location: 'top' })
11+
}}
12+
/>
13+
)
14+
}

0 commit comments

Comments
 (0)