/* Copyright (C) 2024 Manuel Bustillo*/

'use client';

import Arrangement from '@/app/ui/arrangements/arrangement';
import React, { useState } from 'react';
import ArrangementsTable from '@/app/ui/arrangements/arrangements-table';

export default function Page() {
  const [currentArrangement, setCurrentArrangement] = useState<string | null>(null);

  return (
    <>
      <ArrangementsTable onArrangementSelected={setCurrentArrangement} />
      {currentArrangement && <Arrangement key={currentArrangement} id={currentArrangement} />}
    </>
  )
}