'use server';

import './style.scss';
import { notFound } from 'next/navigation';
import { fetchDocument } from '@/lib/api/page/document';
import NavTab from '@/app/support/navTab';

export default async function Guide() {
	const result = await fetchDocument('guide');

	if (!result.success || !result.data) {
		return notFound();
	}

	const doc = result.data;

	return (
		<>
			<NavTab currentTab='guide' />

			<article id='guide'>
				<h1>{doc.subject}</h1>
				<hr />
				<br />
				{doc.content && (
					<section dangerouslySetInnerHTML={{ __html: doc.content }} />
				)}
			</article>
		</>
	);
}
