shell.tsx 606 B

123456789101112131415161718
  1. import { getGitHubStars, getVSCodeDownloads } from "@/lib/stats"
  2. import { NavBar, Footer } from "@/components/chromes"
  3. // Invalidate cache when a request comes in, at most once every hour.
  4. export const revalidate = 3600
  5. export default async function Shell({ children }: { children: React.ReactNode }) {
  6. const [stars, downloads] = await Promise.all([getGitHubStars(), getVSCodeDownloads()])
  7. return (
  8. <div className="flex min-h-screen flex-col bg-background text-foreground">
  9. <NavBar stars={stars} downloads={downloads} />
  10. <main className="flex-1">{children}</main>
  11. <Footer />
  12. </div>
  13. )
  14. }