---
import { getCollection } from 'astro:content';
import Layout from '../../layouts/Layout.astro'
import QuestListing from '../../components/questListing.astro'
import DatabaseSection from '../../layouts/databaseSection.astro'

const description = 'FGO NA TA Database'
const fulldata = await getCollection('taInfoData')

fulldata.sort(
  (a, b) => b.data.info.questReleaseDate.valueOf()  - a.data.info.questReleaseDate.valueOf()  ||  b.data.info.fightNumber - a.data.info.fightNumber
)

---

<Layout
  title="TA Database - FGO TA"
  currentpage="database"
  descriptionOverride={description}
>
  <DatabaseSection title="FGO NA TA Database">
    {fulldata.map((quest) => <QuestListing { ...{...quest.data.info, slug: quest.id} } />)}
  </DatabaseSection>
</Layout>

<style></style>
