import { AlertTitle } from '@ui/components/shadcn/ui/alert'
import { AlertCircle } from 'lucide-react'
import Link from 'next/link'
import { Alert, AlertDescription, Button } from 'ui'
import { DOCS_URL } from '@/lib/constants'
interface RAMWarningsProps {
hasAccessToComputeSizes: boolean
upgradeUrl: string
severity?: 'warning' | 'critical' | null
}
export const RAMWarnings = ({
hasAccessToComputeSizes,
upgradeUrl,
severity,
}: RAMWarningsProps) => {
if (severity === 'warning') {
return (
Your memory usage has exceeded 80%
High memory usage could result in overall degraded performance, and in rare cases, your
instance may become unresponsive. If you need more resources, consider upgrading to a
larger compute add-on.
)
}
if (severity === 'critical') {
return (
Your memory usage has reached 100%
High memory usage could result in overall degraded performance, and in rare cases, your
instance may become unresponsive. If you need more resources, consider upgrading to a
larger compute add-on.