-
Notifications
You must be signed in to change notification settings - Fork 30
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 #517 from benjamin-747/main
fix Missing Suspense boundary with useSearchParams in nextjs and wind…
- Loading branch information
Showing
14 changed files
with
279 additions
and
109 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
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
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
'use client' | ||
import MergeDetail from "@/components/MergeDetail"; | ||
import { useMRDetail } from "../api/fetcher"; | ||
import { Skeleton } from "antd/lib"; | ||
import { useSearchParams } from "next/navigation"; | ||
import { Suspense } from 'react' | ||
|
||
export default function Page() { | ||
return ( | ||
<Suspense> | ||
<MRDetailPage /> | ||
</Suspense> | ||
); | ||
} | ||
|
||
function MRDetailPage() { | ||
const searchParams = useSearchParams(); | ||
const id = searchParams.get('id'); | ||
const { mrDetail, isMRLoading, isMRError } = useMRDetail(id); | ||
if (isMRLoading) return <Skeleton />; | ||
|
||
return ( | ||
<div> | ||
<MergeDetail mrDetail={mrDetail.data} /> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.
06731f6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
mega – ./
mega-git-main-gitmono.vercel.app
mega-gitmono.vercel.app
gitmega.dev
www.gitmega.dev