Files
JJ KasperGitHubkodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
619c76c0f9 Fix infinite invalidations loop in app dir (#46526)Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This fixes a case where depending on the timings of compilers being done
could cause an infinite invalidation loop.

**Before**


https://user-images.githubusercontent.com/22380829/221786587-1a4cc6ab-f273-4191-92af-a57e9fff1261.mp4

**After**


https://user-images.githubusercontent.com/22380829/221786611-f55c3da9-0201-40be-95a8-3ef1869d6a66.mp4

x-ref: [slack
thread](https://vercel.slack.com/archives/C03KAR5DCKC/p1677441845988529?thread_ts=1677429424.151329&cid=C03KAR5DCKC)

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-02-28 11:07:29 +01:00

45 lines
1.2 KiB
TypeScript

import { A as a } from 'app/(post)/components/a'
import { P as p } from 'app/(post)/components/p'
import { H1 as h1 } from 'app/(post)/components/h1'
import { H2 as h2 } from 'app/(post)/components/h2'
import { H3 as h3 } from 'app/(post)/components/h3'
import { OL as ol } from 'app/(post)/components/ol'
import { UL as ul } from 'app/(post)/components/ul'
import { LI as li } from 'app/(post)/components/li'
import { HR as hr } from 'app/(post)/components/hr'
import { Tweet } from 'app/(post)/components/tweet'
import { Image } from 'app/(post)/components/image'
import { Snippet } from 'app/(post)/components/snippet'
import { Caption } from 'app/(post)/components/caption'
import { Callout } from 'app/(post)/components/callout'
import { Ref, FootNotes, FootNote } from 'app/(post)/components/footnotes'
import { Blockquote as blockquote } from 'app/(post)/components/blockquote'
export function useMDXComponents(components: {
[component: string]: React.ComponentType
}) {
return {
...components,
a,
h1,
h2,
h3,
p,
ol,
ul,
li,
hr,
pre: Snippet,
img: Image,
blockquote,
Tweet,
Image,
Snippet,
Caption,
Callout,
Ref,
FootNotes,
FootNote,
}
}