import { getFooter } from "@/lib/trpc/memoizedRequests"

import FooterMainNav from "./MainNav"
import FooterSecondaryNav from "./SecondaryNav"

import styles from "./navigation.module.css"

export default async function FooterNavigation() {
  const footer = await getFooter()
  if (!footer) {
    return null
  }
  return (
    <section className={styles.section}>
      <div className={styles.maxWidth}>
        <FooterMainNav mainLinks={footer.mainLinks} />
        <FooterSecondaryNav
          secondaryLinks={footer.secondaryLinks}
          appDownloads={footer.appDownloads}
        />
      </div>
    </section>
  )
}
