page.tsx 613 B

12345678910111213141516171819202122232425262728293031
  1. 'use server';
  2. import './style.scss';
  3. import { notFound } from 'next/navigation';
  4. import { fetchDocument } from '@/lib/api/page/document';
  5. import NavTab from '@/app/(main)/support/navTab';
  6. export default async function Guide() {
  7. const result = await fetchDocument('guide');
  8. if (!result.success || !result.data) {
  9. return notFound();
  10. }
  11. const doc = result.data;
  12. return (
  13. <>
  14. <NavTab currentTab='guide' />
  15. <article id='guide'>
  16. <h1>{doc.subject}</h1>
  17. <hr />
  18. <br />
  19. {doc.content && (
  20. <section dangerouslySetInnerHTML={{ __html: doc.content }} />
  21. )}
  22. </article>
  23. </>
  24. );
  25. }