// Exercise 1: root layout + home page
//
// This exercise models two files of a real App Router project as one
// deliverable (course convention — split them locally to actually run
// with `npx create-next-app`).
//
// STEP 1 — this is meant to become `app/layout.tsx`. Fill in the TODOs
// so it renders a valid document shell.
//
// STEP 2 — this is meant to become `app/page.tsx`. Fill in the TODOs so
// it renders a heading and a paragraph.

import type { ReactNode } from "react";

// ---- app/layout.tsx ----
function RootLayout({ children }: { children: ReactNode }) {
  // TODO: return JSX with <html lang="en"> as the outer element and
  // <body> as the child, rendering {children} inside <body> after a
  // <nav> element containing the text "Site Nav".
  return null;
}

// ---- app/page.tsx ----
function HomePage() {
  // TODO: return JSX with an <h1> reading "Welcome" and a <p> reading
  // "This is the home page."
  return null;
}

// --- self-check: do not modify below this line ---
// (Illustrative only — JSX equality here is structural, this just
// verifies you replaced the `return null` placeholders.)
function selfCheck() {
  const layoutOk = RootLayout.toString().includes("return null") === false;
  const pageOk = HomePage.toString().includes("return null") === false;
  console.log(layoutOk && pageOk ? "PASS" : "FAIL — still returning null somewhere");
}

selfCheck();

export { RootLayout, HomePage };
