File size: 445 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use client'

import Link from 'next/link'
import React from 'react'

export default function Page() {
  const broken = (
    <>
      <Link href="/invalid" as="mailto:john@example.com">
        <a>Invalid link</a>
      </Link>
    </>
  )

  const [shouldShow, setShouldShow] = React.useState(false)

  return (
    <div>
      <button onClick={() => setShouldShow(true)}>break on client</button>
      {shouldShow && broken}
    </div>
  )
}