ReplicationDisclaimerDialog.tsx 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import {
  2. Button,
  3. Dialog,
  4. DialogContent,
  5. DialogFooter,
  6. DialogHeader,
  7. DialogSection,
  8. DialogSectionSeparator,
  9. DialogTitle,
  10. } from 'ui'
  11. interface ReplicationDisclaimerDialogProps {
  12. open: boolean
  13. isLoading: boolean
  14. onOpenChange: (value: boolean) => void
  15. onConfirm: () => void
  16. }
  17. export const ReplicationDisclaimerDialog = ({
  18. open,
  19. isLoading,
  20. onOpenChange,
  21. onConfirm,
  22. }: ReplicationDisclaimerDialogProps) => {
  23. return (
  24. <Dialog open={open} onOpenChange={onOpenChange}>
  25. <DialogContent className="sm:max-w-lg">
  26. <DialogHeader>
  27. <DialogTitle>Replication limitations</DialogTitle>
  28. </DialogHeader>
  29. <DialogSectionSeparator />
  30. <DialogSection className="space-y-4 text-sm">
  31. <p className="text-foreground">
  32. Creating this replication pipeline will immediately start syncing data from your
  33. publication into the destination. Make sure you understand the limitations of the system
  34. before proceeding.
  35. </p>
  36. <div className="text-foreground-light">
  37. <ul className="list-disc flex flex-col gap-y-1.5 pl-5 text-sm leading-snug">
  38. <li>
  39. <strong className="text-foreground">Custom data types replicate as strings.</strong>{' '}
  40. Check that the destination can interpret those string values correctly.
  41. </li>
  42. <li>
  43. <strong className="text-foreground">Generated columns are skipped.</strong> Replace
  44. them with triggers or materialized views if you need the derived values downstream.
  45. </li>
  46. <li>
  47. <strong className="text-foreground">
  48. FULL replica identity is strongly recommended.
  49. </strong>{' '}
  50. With FULL replica identity deletes and updates include the payload that is needed to
  51. correctly apply those changes.
  52. </li>
  53. <li>
  54. <strong className="text-foreground">Schema changes aren’t supported yet.</strong>{' '}
  55. Plan for manual adjustments if you need to alter replicated tables.
  56. </li>
  57. </ul>
  58. </div>
  59. </DialogSection>
  60. <DialogSectionSeparator />
  61. <DialogFooter>
  62. <Button type="default" disabled={isLoading} onClick={() => onOpenChange(false)}>
  63. Cancel
  64. </Button>
  65. <Button loading={isLoading} onClick={onConfirm}>
  66. Understood, start replication
  67. </Button>
  68. </DialogFooter>
  69. </DialogContent>
  70. </Dialog>
  71. )
  72. }