TransferProjectPanel.tsx 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { Truck } from 'lucide-react'
  2. import { Card, CardContent } from 'ui'
  3. import {
  4. PageSection,
  5. PageSectionContent,
  6. PageSectionMeta,
  7. PageSectionSummary,
  8. PageSectionTitle,
  9. } from 'ui-patterns/PageSection'
  10. import { TransferProjectButton } from './TransferProjectButton'
  11. import { useSelectedProjectQuery } from '@/hooks/misc/useSelectedProject'
  12. export const TransferProjectPanel = () => {
  13. const { data: project } = useSelectedProjectQuery()
  14. if (project === undefined) return null
  15. return (
  16. <PageSection id="transfer-project">
  17. <PageSectionMeta>
  18. <PageSectionSummary>
  19. <PageSectionTitle>Transfer project</PageSectionTitle>
  20. </PageSectionSummary>
  21. </PageSectionMeta>
  22. <PageSectionContent>
  23. <Card>
  24. <CardContent>
  25. <div className="flex flex-col @lg:flex-row @lg:justify-between @lg:items-center gap-4">
  26. <div className="flex space-x-4">
  27. <Truck className="mt-1" />
  28. <div className="space-y-1 xl:max-w-lg">
  29. <p className="text-sm">Transfer project to another organization</p>
  30. <p className="text-sm text-foreground-light">
  31. To transfer projects, the owner must be a member of both the source and target
  32. organizations.
  33. </p>
  34. </div>
  35. </div>
  36. <div>
  37. <TransferProjectButton />
  38. </div>
  39. </div>
  40. </CardContent>
  41. </Card>
  42. </PageSectionContent>
  43. </PageSection>
  44. )
  45. }