Skip to content

Commit

Permalink
feat: wrap DNSForm in Suspense for improved loading experience
Browse files Browse the repository at this point in the history
  • Loading branch information
ccbikai committed Sep 24, 2024
1 parent fcf7a73 commit 4f8d638
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/dns/dns-panel.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import { useState } from 'react'
import { useState, Suspense } from 'react'
import { DNSForm } from './dns-form'
import { DNSTable } from './dns-table'
import { DNSFeature } from './dns-feature'
Expand All @@ -23,7 +23,9 @@ export default function DNSPanel() {
return (
<>
{/* <DNSHero/> */}
<DNSForm onSearch={onSearch} />
<Suspense>
<DNSForm onSearch={onSearch} />
</Suspense>
{
formData.name ? <DNSTable formData={formData} /> : <DNSFeature/>
}
Expand Down

0 comments on commit 4f8d638

Please sign in to comment.