import { serverClient } from "@/lib/trpc/server"

import ClientJourney from "./Client"

export default async function JourneyTable() {
  const initialJourneyTransactions =
    await serverClient().user.transaction.friendTransactions({
      page: 1,
      limit: 5,
    })
  if (!initialJourneyTransactions?.data) {
    return null
  }

  return (
    <ClientJourney initialJourneyTransactions={initialJourneyTransactions} />
  )
}
