mirror of
https://github.com/supabase/supabase.git
synced 2026-10-17 07:09:07 +03:00
* chore: cleanup packages - Avoid circular imports - Export API-types as types - pg-format without depending on Node internal Buffer (not browser-compatible) - Avoid importing from barrel files in ui dir * chore: avoid barrel file imports in studio (#27771) * chore: avoid barrel file imports - Removes some unused imports - Avoids barrel file import for faster builds + less memory * add eslint rule * type fixes * delete layouts barrel * delete components/grid barrel file * delete components/grid/utils barrel file * delete components/grid/components/common barrel file * delete components/grid/components/editor barrel file * delete components/grid/components/formatter barrel file * delete components/grid/components/grid barrel file * delete components/grid/components/header/filter barrel file * remote components/grid/store barrel file * remove components/interfaces/Auth/Policies barrel file * delete components/interfaces/Settings/Logs barrel file * delete components/ui/CodeEditor barrel file * delete components/ui/Forms barrel file * delete components/ui/Shimmers barrel file * delete data/analytics barrel file * delete hooks barrel file * cleanup lib/common/fetch barrel file * final * barral files cleanup * global react-data-grid styles * remove console.log --------- Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com> * fix build --------- Co-authored-by: Kevin Grüneberg <k.grueneberg1994@gmail.com>
70 lines
2.5 KiB
TypeScript
70 lines
2.5 KiB
TypeScript
import Link from 'next/link'
|
|
|
|
import { useSelectedOrganization } from 'hooks/misc/useSelectedOrganization'
|
|
import { Button, Modal } from 'ui'
|
|
import { TIER_QUERY_LIMITS } from './Logs.constants'
|
|
|
|
interface Props {
|
|
show: boolean
|
|
setShowUpgradePrompt: (value: boolean) => void
|
|
}
|
|
|
|
const UpgradePrompt: React.FC<Props> = ({ show, setShowUpgradePrompt }) => {
|
|
const organization = useSelectedOrganization()
|
|
|
|
return (
|
|
<Modal
|
|
hideFooter
|
|
visible={show}
|
|
closable
|
|
size="medium"
|
|
header="Log retention"
|
|
onCancel={() => setShowUpgradePrompt(false)}
|
|
>
|
|
<Modal.Content>
|
|
<div className="space-y-4">
|
|
<p className="text-sm">
|
|
Logs can be retained up to a duration of 3 months depending on the plan that your
|
|
project is on.
|
|
</p>
|
|
<div className="border-control bg-surface-300 rounded border">
|
|
<div className="flex items-center px-4 pt-2 pb-1">
|
|
<p className="text-foreground-light w-[40%] text-sm">Plan</p>
|
|
<p className="text-foreground-light w-[60%] text-sm">Retention duration</p>
|
|
</div>
|
|
<div className="py-1">
|
|
<div className="flex items-center px-4 py-1">
|
|
<p className="w-[40%] text-sm">Free</p>
|
|
<p className="w-[60%] text-sm">{TIER_QUERY_LIMITS.FREE.text}</p>
|
|
</div>
|
|
<div className="flex items-center px-4 py-1">
|
|
<p className="w-[40%] text-sm">Pro</p>
|
|
<p className="w-[60%] text-sm">{TIER_QUERY_LIMITS.PRO.text}</p>
|
|
</div>
|
|
<div className="flex items-center px-4 py-1">
|
|
<p className="w-[40%] text-sm">Team</p>
|
|
<p className="w-[60%] text-sm">{TIER_QUERY_LIMITS.TEAM.text}</p>
|
|
</div>
|
|
<div className="flex items-center px-4 py-1">
|
|
<p className="w-[40%] text-sm">Enterprise</p>
|
|
<p className="w-[60%] text-sm">{TIER_QUERY_LIMITS.ENTERPRISE.text}</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</Modal.Content>
|
|
<Modal.Separator />
|
|
<Modal.Content className="flex justify-end gap-3">
|
|
<Button type="default" onClick={() => setShowUpgradePrompt(false)}>
|
|
Close
|
|
</Button>
|
|
<Button asChild size="tiny">
|
|
<Link href={`/org/${organization?.slug}/billing?panel=subscriptionPlan`}>Upgrade</Link>
|
|
</Button>
|
|
</Modal.Content>
|
|
</Modal>
|
|
)
|
|
}
|
|
|
|
export default UpgradePrompt
|