LogDrainsEmpty.tsx 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { IS_PLATFORM } from 'common'
  2. import Link from 'next/link'
  3. import { Button, Card, cn } from 'ui'
  4. import { AnimatedLogos } from './AnimatedLogos'
  5. import { VoteLink } from './VoteLink'
  6. import { UpgradePlanButton } from '@/components/ui/UpgradePlanButton'
  7. import { DOCS_URL } from '@/lib/constants'
  8. export const LogDrainsEmpty = () => {
  9. const items = [
  10. {
  11. step: 1,
  12. title: 'Pricing',
  13. description:
  14. 'Log Drains are available as a project Add-On for all Pro, Team, and Enterprise users. Each Log Drain costs $60 per month.',
  15. label: 'See our pricing',
  16. link: `${DOCS_URL}/guides/platform/manage-your-usage/log-drains`,
  17. },
  18. {
  19. step: 2,
  20. title: 'Connect to your drain',
  21. description:
  22. 'We offer support for multiple destinations including Datadog, Loki, Sentry or a custom endpoint.',
  23. label: 'Read our documentation',
  24. link: `${DOCS_URL}/guides/telemetry/log-drains`,
  25. },
  26. ].filter((item) => IS_PLATFORM || item.title !== 'Pricing')
  27. return (
  28. <div className="flex grow h-full">
  29. <div className="flex grow items-center justify-center p-12 @container">
  30. <div className="w-full max-w-4xl flex flex-col items-center gap-0">
  31. <div className="text-center mb-12">
  32. <AnimatedLogos />
  33. <h2 className="heading-section mb-1">Capture your logs, your way</h2>
  34. <p className="text-foreground-light mb-6">
  35. Upgrade to a Pro, Team or Enterprise Plan to send your logs to your preferred platform
  36. </p>
  37. {/* This should only be shown to free tier users so upgrade to Pro makes sense */}
  38. <UpgradePlanButton
  39. plan="Pro"
  40. source="log-drains-empty-state"
  41. featureProposition="use Log Drains"
  42. />
  43. </div>
  44. <Card
  45. className={cn('grid grid-cols-1 bg divide-x mb-8', IS_PLATFORM && '@xl:grid-cols-2')}
  46. >
  47. {items.map((item, i) => (
  48. <div className="flex flex-col h-full p-6" key={i}>
  49. <div className="flex items-center gap-3 mb-2">
  50. <span
  51. className={cn(
  52. 'text-xs shrink-0 font-mono text-foreground-light w-7 h-7 bg border flex items-center justify-center rounded-md',
  53. !IS_PLATFORM && 'hidden'
  54. )}
  55. >
  56. {item.step}
  57. </span>
  58. <h3 className="heading-default">{item.title}</h3>
  59. </div>
  60. <p className="text-foreground-light text-sm mb-4 flex-1">{item.description}</p>
  61. <Button type="default" className="w-full" asChild>
  62. <Link href={item.link} target="_blank">
  63. {item.label}
  64. </Link>
  65. </Button>
  66. </div>
  67. ))}
  68. </Card>
  69. <VoteLink />
  70. </div>
  71. </div>
  72. </div>
  73. )
  74. }