+
+ )
+}
+
+export default withAuth(observer(PageLayout))
diff --git a/studio/pages/project/[ref]/functions/[id]/invocations.tsx b/studio/pages/project/[ref]/functions/[id]/invocations.tsx
new file mode 100644
index 00000000000..5217ba872bc
--- /dev/null
+++ b/studio/pages/project/[ref]/functions/[id]/invocations.tsx
@@ -0,0 +1,32 @@
+import React from 'react'
+import { NextPage } from 'next'
+import { useRouter } from 'next/router'
+import { observer } from 'mobx-react-lite'
+import { withAuth } from 'hooks'
+import { LOG_TYPE_LABEL_MAPPING } from 'components/interfaces/Settings/Logs'
+import LogsPreviewer from 'components/interfaces/Settings/Logs/LogsPreviewer'
+import FunctionsLayout from 'components/interfaces/Functions/FunctionsLayout'
+
+/**
+ * Placeholder page for logs previewers until we figure out where to slot them
+ */
+export const LogPage: NextPage = () => {
+ const router = useRouter()
+ const { ref, type, id } = router.query
+
+ const title = `Invocation Logs - ${
+ LOG_TYPE_LABEL_MAPPING[type as keyof typeof LOG_TYPE_LABEL_MAPPING]
+ }`
+
+ return (
+
+
+
+ )
+}
+
+export default withAuth(observer(LogPage))
diff --git a/studio/pages/project/[ref]/functions/[id]/logs-old.tsx b/studio/pages/project/[ref]/functions/[id]/logs-old.tsx
new file mode 100644
index 00000000000..928f3fc59c6
--- /dev/null
+++ b/studio/pages/project/[ref]/functions/[id]/logs-old.tsx
@@ -0,0 +1,334 @@
+import dayjs from 'dayjs'
+import { useRouter } from 'next/router'
+import { useState } from 'react'
+import { observer } from 'mobx-react-lite'
+
+import {
+ Button,
+ Checkbox,
+ IconCalendar,
+ IconChevronRight,
+ IconExternalLink,
+ IconGlobe,
+ IconSearch,
+ Input,
+ Popover,
+ SidePanel,
+} from '@supabase/ui'
+
+import { withAuth } from 'hooks'
+import Table from 'components/to-be-cleaned/Table'
+import FunctionsLayout from 'components/interfaces/Functions/FunctionsLayout'
+import FunctionLogsItem from 'components/interfaces/Functions/FunctionLogsItem'
+import { LOGS_DATA } from 'components/interfaces/Functions/Functions.data'
+
+const EmptyFunctions = () => {
+ return (
+ <>
+
+ Scalable pay-as-you-go functions as a service (FaaS) to run your code with zero server
+ management.
+
+
+ No servers to provision, manage, or upgrade Automatically scale based on the load Integrated
+ monitoring, logging, and debugging capability Built-in security at role and per function
+ level based on the principle of least privilege Key networking capabilities for hybrid and
+ multi-cloud scenarios
+
+
+ }>Get started
+ }>
+ Documentation
+
+
+
+
Function examples
+
+
+
+
+
+
+
Stripe payments
+
+ Charge a payment credit card when a database event occurs
+
+
+
+
+
+
+
+
+
Stripe payments
+
+ Charge a payment credit card when a database event occurs
+
+
+
+
+
+
+
+
+
Stripe payments
+
+ Charge a payment credit card when a database event occurs
+
+ )
+
+ return (
+
+
+
+ )
+}
+
+export default withAuth(observer(PageLayout))
diff --git a/studio/pages/project/[ref]/functions/[id]/logs.tsx b/studio/pages/project/[ref]/functions/[id]/logs.tsx
new file mode 100644
index 00000000000..4ac048890ea
--- /dev/null
+++ b/studio/pages/project/[ref]/functions/[id]/logs.tsx
@@ -0,0 +1,32 @@
+import React from 'react'
+import { NextPage } from 'next'
+import { useRouter } from 'next/router'
+import { observer } from 'mobx-react-lite'
+import { withAuth } from 'hooks'
+import { LOG_TYPE_LABEL_MAPPING } from 'components/interfaces/Settings/Logs'
+import LogsPreviewer from 'components/interfaces/Settings/Logs/LogsPreviewer'
+import FunctionsLayout from 'components/interfaces/Functions/FunctionsLayout'
+
+/**
+ * Placeholder page for logs previewers until we figure out where to slot them
+ */
+export const LogPage: NextPage = () => {
+ const router = useRouter()
+ const { ref, type, id } = router.query
+
+ const title = `Function Logs - ${
+ LOG_TYPE_LABEL_MAPPING[type as keyof typeof LOG_TYPE_LABEL_MAPPING]
+ }`
+
+ return (
+
+
+
+ )
+}
+
+export default withAuth(observer(LogPage))
diff --git a/studio/pages/project/[ref]/functions/[id]/triggers.tsx b/studio/pages/project/[ref]/functions/[id]/triggers.tsx
new file mode 100644
index 00000000000..6a1bb91493c
--- /dev/null
+++ b/studio/pages/project/[ref]/functions/[id]/triggers.tsx
@@ -0,0 +1,10 @@
+import { observer } from 'mobx-react-lite'
+import { withAuth } from 'hooks'
+
+import FunctionsLayout from 'components/interfaces/Functions/FunctionsLayout'
+
+const PageLayout = () => {
+ return Triggers
+}
+
+export default withAuth(observer(PageLayout))
diff --git a/studio/pages/project/[ref]/functions/index.tsx b/studio/pages/project/[ref]/functions/index.tsx
new file mode 100644
index 00000000000..c07a15bd1f8
--- /dev/null
+++ b/studio/pages/project/[ref]/functions/index.tsx
@@ -0,0 +1,263 @@
+import Link from 'next/link'
+import { useEffect } from 'react'
+import { useRouter } from 'next/router'
+import { observer } from 'mobx-react-lite'
+import { Button, IconBookOpen, IconSearch, IconTerminal, Input, Loading } from '@supabase/ui'
+
+import { useStore, withAuth } from 'hooks'
+import { post } from 'lib/common/fetch'
+import { API_URL, PROJECT_STATUS } from 'lib/constants'
+import Table from 'components/to-be-cleaned/Table'
+import FunctionsLayout from 'components/interfaces/Functions/FunctionsLayout'
+import FunctionsListItem from 'components/interfaces/Functions/FunctionsListItem'
+import CommandRender from 'components/interfaces/Functions/CommandRender'
+import { Function } from 'components/interfaces/Functions/Functions.types'
+
+const EmptyFunctions = () => {
+ const router = useRouter()
+ const { ref } = router.query
+
+ interface Commands {
+ command: string
+ description: string
+ jsx?: () => void
+ comment?: string
+ }
+ const commands: Commands[] = [
+ {
+ command: 'supabase init',
+ description: "Needed if the project hasen't been inited before",
+ jsx: () => {
+ return (
+ <>
+ supabase init
+ >
+ )
+ },
+ comment: 'Initialize Supabase locally',
+ },
+ {
+ command: 'supabase login',
+ description: "Writes the user's API token to disk",
+ jsx: () => {
+ return (
+ <>
+ supabase login
+ >
+ )
+ },
+ comment: 'Login using your access token',
+ },
+ {
+ command: `supabase link --ref ${ref}`,
+ description: `Associate the current folder with your Supabase project ${ref}`,
+ jsx: () => {
+ return (
+ <>
+ supabase link --ref {ref}
+ >
+ )
+ },
+ comment: 'Link this project',
+ },
+ {
+ command: 'supabase functions new hello',
+ description: ' creates a function stub at ./functions/hello/hello.ts',
+ jsx: () => {
+ return (
+ <>
+ supabase functions new hello
+ >
+ )
+ },
+ comment: 'Create a function',
+ },
+ {
+ command: 'supabase functions deploy hello',
+ description: 'Deploys function at ./functions/hello/index.ts',
+ jsx: () => {
+ return (
+ <>
+ supabase functions deploy hello
+ >
+ )
+ },
+ comment: 'Deploy your function',
+ },
+ {
+ command: `curl -L -X POST 'https://${ref}.functions.supabase.co/hello' -H 'Authorization: Bearer [YOUR ANON KEY]'`,
+ description: 'Invokes the hello function',
+ jsx: () => {
+ return (
+ <>
+ curl -L -X POST 'https://{ref}
+ .functions.supabase.co/hello' -H 'Authorization: Bearer [YOUR ANON KEY]'
+ >
+ )
+ },
+ comment: 'Invoke your function',
+ },
+ ]
+ return (
+ <>
+
+
+
+ Scalable pay-as-you-go functions as a service (FaaS) to run your code with zero server
+ management.
+
+
+ No servers to provision, manage, or upgrade Automatically scale based on the load
+ Integrated monitoring, logging, and debugging capability Built-in security at role and
+ per function level based on the principle of least privilege Key networking capabilities
+ for hybrid and multi-cloud scenarios
+
),
+ LogsExplorerLayout: jest.fn().mockImplementation(({ children }) =>
{children}
),
}))
// mock mobx
@@ -17,7 +17,7 @@ jest.mock('next/router')
import { useRouter } from 'next/router'
const defaultRouterMock = () => {
const router = jest.fn()
- router.query = { ref: '123', type: 'auth' }
+ router.query = { ref: '123' }
router.push = jest.fn()
router.pathname = 'logs/path'
return router
@@ -40,67 +40,71 @@ jest.mock('components/ui/Flag/Flag')
import Flag from 'components/ui/Flag/Flag'
Flag.mockImplementation(({ children }) => <>{children}>)
jest.mock('hooks')
-import { useFlag } from 'hooks'
+import { useStore, useFlag } from 'hooks'
useFlag.mockReturnValue(true)
+useStore.mockImplementation(() => ({
+ content: jest.fn(),
+}))
import { SWRConfig } from 'swr'
-jest.mock('pages/project/[ref]/settings/logs/explorer')
-import { LogsExplorerPage } from 'pages/project/[ref]/settings/logs/explorer'
-LogsExplorerPage.mockImplementation((props) => {
- const Page = jest.requireActual('pages/project/[ref]/settings/logs/explorer').LogsExplorerPage
- // wrap with SWR to reset the cache each time
- return (
- new Map(),
- shouldRetryOnError: false,
- }}
- >
-
-
- )
-})
+import { LogsExplorerPage as Page } from 'pages/project/[ref]/logs-explorer/index'
+const LogsExplorerPage = (props) => (
+ new Map(),
+ shouldRetryOnError: false,
+ }}
+ >
+
+
+)
-import { render, fireEvent, waitFor, screen, act } from '@testing-library/react'
+import { render, fireEvent, waitFor, screen } from '@testing-library/react'
import userEvent from '@testing-library/user-event'
-import { getToggleByText } from '../../helpers'
-import { wait } from '@testing-library/user-event/dist/utils'
import { logDataFixture } from '../../fixtures'
+
beforeEach(() => {
// reset mocks between tests
get.mockReset()
useRouter.mockReset()
useRouter.mockReturnValue(defaultRouterMock())
})
-test('can display log data and metadata', async () => {
+test('can display log data', async () => {
get.mockResolvedValue({
result: [
logDataFixture({
- event_message: 'some event happened',
+ id: 'some-event-happened',
metadata: {
my_key: 'something_value',
},
}),
],
})
- render()
- fireEvent.click(await screen.findByText(/happened/))
- await screen.findByText(/my_key/)
+ const {container} = render()
+ let editor = container.querySelector('.monaco-editor')
+ await waitFor(() => {
+ editor = container.querySelector('.monaco-editor')
+ expect(editor).toBeTruthy()
+ })
+ // type new query
+ userEvent.type(editor, 'select \ncount(*) as my_count \nfrom edge_logs')
+
+ userEvent.click(await screen.findByText(/Run/))
+ const row = await screen.findByText("some-event-happened")
+ screen.debug()
+ userEvent.click(row)
await screen.findByText(/something_value/)
})
test('q= query param will populate the query input', async () => {
const router = defaultRouterMock()
- router.query = { ...router.query, type: 'api', q: 'some_query', s: 'someSearch' }
+ router.query = { ...router.query, type: 'api', q: 'some_query' }
useRouter.mockReturnValue(router)
render()
// should populate editor with the query param
await waitFor(() => {
expect(get).toHaveBeenCalledWith(expect.stringContaining('sql=some_query'))
})
-
- // query takes precedence of search queryparam
- expect(() => !screen.queryByDisplayValue(/someSearch/))
})
test('custom sql querying', async () => {
diff --git a/studio/tsconfig.json b/studio/tsconfig.json
index 379a3b4c863..71436a2fdd4 100644
--- a/studio/tsconfig.json
+++ b/studio/tsconfig.json
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
- "lib": [
- "dom",
- "dom.iterable",
- "esnext"
- ],
+ "lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
@@ -17,16 +13,9 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
- "baseUrl": "."
+ "baseUrl": ".",
+ "downlevelIteration": true
},
- "include": [
- "next-env.d.ts",
- "**/*.ts",
- "**/*.tsx",
- "**/*.js",
- "**/*.jsx"
- ],
- "exclude": [
- "node_modules"
- ]
+ "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
+ "exclude": ["node_modules"]
}
diff --git a/studio/types/userContent.ts b/studio/types/userContent.ts
index 35c79fac7d3..1219ea809b3 100644
--- a/studio/types/userContent.ts
+++ b/studio/types/userContent.ts
@@ -2,9 +2,9 @@ export interface UserContent {
id?: string
name: string
description?: string
- type: 'sql' | 'report'
+ type: 'sql' | 'report' | 'log_sql'
visibility: 'user' | 'project' | 'org' | 'public'
- content: Dashboards.Content | SqlSnippets.Content
+ content: Dashboards.Content | SqlSnippets.Content | LogSqlSnippets.Content
owner_id?: number // user id
last_updated_by?: number // user id
inserted_at?: string // '2021-08-26T08:24:52.040695+00:00'
@@ -120,3 +120,25 @@ export namespace SqlSnippets {
favorite: boolean
}
}
+
+export namespace LogSqlSnippets {
+ /**
+ * To be stored in the database: public.user_content.content
+ * In this case there is only one thing to store, but it's good to
+ * nest it in an object for future expansion.
+ */
+ export interface Content {
+ // unique id of the sql snippet, possibly to used so snippets can support versioning
+ content_id: string
+
+ // A full SQL query - this will be hashed on the /content endpoint
+ sql: string
+
+ // we can add some versioning to this schema in case we need to change the format.
+ schema_version: string
+
+ // show sql snippet as a favorite.
+ // this could be problematic if sql snippets have visibility that is != 'user'
+ favorite: boolean
+ }
+}
diff --git a/web/docs/guides/platform/logs.mdx b/web/docs/guides/platform/logs.mdx
index e40ac2a8a8d..c1be8d25568 100644
--- a/web/docs/guides/platform/logs.mdx
+++ b/web/docs/guides/platform/logs.mdx
@@ -1,20 +1,39 @@
---
id: logs
-title: Log Browser
+title: Logging
description: Getting started with Supabase Platform Log Browser
---
The Supabase Platform provides a log browser that allows log tracing and debugging. Currently, PostgreSQL and Cloudflare edge logs are available.
-The features discussed in this article are only available through the Supabase platform and are not available on self-hosted.
+:::note
-The log browser can be accessed through:
+The features discussed in this article are only available through the Supabase Platform and are not available on self-hosted.
-- `Project Overview > Settings > API`
-- `Project Overview > Settings > Database`
+:::
+
+## Log Explorer

+The log browser can be accessed in the sidebar under `Log Explorer`. The Log Explorer is for exploring all the logs within your project and is not specific to any product.
+
+## Product Logs
+
+As well as a Log Explorer, Supabase provides a logging interface specific to each product.
+
+### API Logs
+
+
+
+The API Logs can be found under `Database > API Logs`. These show all network requests for the REST and GraphQL [API](/docs/guides/api).
+
+### Postgres Logs
+
+
+
+The Postgres Logs can be found under `Database > Postgres Logs`. These show all queries and activity for your [Database](/docs/guides/database).
+
## Basic Querying Features
- Simple regex-based search on the event message.
@@ -28,9 +47,7 @@ To access advanced querying features, you will need to enable **custom queries**

-
-
-`SELECT` queries allow complex and powerful aggregated result sets, letting you to perform in-depth analysis of your log data.
+`select` queries allow complex and powerful aggregated result sets, letting you to perform in-depth analysis of your log data.
For example, you may enter the following into the API logs dashboard to query for each user's IP address:
@@ -55,14 +72,14 @@ The table references are as follows:
Note that cross-table joining is currently not supported.
-#### Unnesting Arrays
+### Unnesting Arrays
In the above example, in order to query the metadata field, we need to unnest the field and add it as a join. Wehn we click on an individual log, we can see that log metadata is stored as an array of objects.
In order to query any value that is an array, we would need to `UNNEST()` that field and add it to the query as a join, thereby allowing us to reference the nested fields within the array.
-#### Functions
+### Functions
You may have also noticed from the above examples that we are able to use certain SQL functions within our queries. The querying engine currently supported is BigQuery, hence you may use [any valid BigQuery function](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators) within your query.
@@ -71,7 +88,7 @@ You may have also noticed from the above examples that we are able to use certai
Each log timestamp is stored as a `TIMESTAMP` data type. In order to utilize the `timestamp` field in a query, you would need to use the appropriate [timestamp functions](https://cloud.google.com/bigquery/docs/reference/standard-sql/timestamp_functions#timestamp).
-### Template Queries
+## Template Queries
Templates are available to help shorten the time needed to craft these queries. There are examples for each complexity level, which can serve as a foundation for your custom queries.
diff --git a/web/static/img/guides/platform/logs/logs-api.png b/web/static/img/guides/platform/logs/logs-api.png
new file mode 100644
index 00000000000..a5051f4ca2a
Binary files /dev/null and b/web/static/img/guides/platform/logs/logs-api.png differ
diff --git a/web/static/img/guides/platform/logs/logs-database.png b/web/static/img/guides/platform/logs/logs-database.png
new file mode 100644
index 00000000000..2b67b16a2a8
Binary files /dev/null and b/web/static/img/guides/platform/logs/logs-database.png differ
diff --git a/web/static/img/guides/platform/logs/sidebar-navigation.png b/web/static/img/guides/platform/logs/sidebar-navigation.png
index 1514460dd79..41cf3ebdfe4 100644
Binary files a/web/static/img/guides/platform/logs/sidebar-navigation.png and b/web/static/img/guides/platform/logs/sidebar-navigation.png differ
diff --git a/web/static/lawyers.txt b/web/static/lawyers.txt
index e248d52b8b7..4aa599ea4d1 100644
--- a/web/static/lawyers.txt
+++ b/web/static/lawyers.txt
@@ -9,7 +9,9 @@ Supabase™ is a trademark of Supabase Inc.
If you're a creator/contributor to one of these packages, thanks!
-Last updated: 2022-03-24
+Last updated: 2022-03-29
+
+JavaScript/TypeScript
-- ------------------------------------ ---------------------- -------------------------------------------------------------------- --------------------------------------------------------------------------------------- -------------------------
0 lodash@4.17.21 MIT https://github.com/lodash/lodash https://github.com/lodash/lodash/raw/master/LICENSE @supabase/ui
@@ -110,3 +112,298 @@ Last updated: 2022-03-24
95 stripe@8.145.0 MIT https://github.com/stripe/stripe-node https://github.com/stripe/stripe-node/raw/master/LICENSE stripe-sync-engine
96 yesql@5.0.0 ISC https://github.com/pihvi/yesql https://github.com/pihvi/yesql stripe-sync-engine
-- ------------------------------------ ---------------------- -------------------------------------------------------------------- --------------------------------------------------------------------------------------- -------------------------
+
+
+Elixir
+
+Id Name Version License
+-- --------------------------------- ------- ----------
+ 0 castore 0.1.11 Apache 2.0
+ 1 certifi 2.5.3 BSD
+ 2 combine 0.10.0 MIT
+ 3 connection 1.1.0 Apache 2.0
+ 4 cowboy 2.8.0 ISC
+ 5 cowboy_telemetry 0.3.1 Apache 2.0
+ 6 cowlib 2.9.1 ISC
+ 7 db_connection 2.4.1 Apache 2.0
+ 8 decimal 2.0.0 Apache 2.0
+ 9 ecto 3.7.1 Apache 2.0
+10 ecto_sql 3.7.1 Apache 2.0
+11 epgsql 4.6.0 BSD
+12 file_system 0.2.10 WTFPL
+13 finch 0.7.0 MIT
+14 gettext 0.18.2 Apache 2.0
+15 hackney 1.17.0 Apache 2.0
+16 httpoison 1.8.0 MIT
+17 idna 6.1.1 MIT
+18 jason 1.2.2 Apache 2.0
+19 joken 2.3.0 Apache 2.0
+20 jose 1.11.1 MIT
+21 metrics 1.0.1 BSD
+22 mime 1.5.0 Apache 2.0
+23 mimerl 1.2.0 MIT
+24 mint 1.3.0 Apache 2.0
+25 nimble_options 0.3.5 Apache 2.0
+26 nimble_pool 0.2.4 Apache 2.0
+27 parse_trans 3.3.1 Apache 2.0
+28 phoenix 1.5.8 MIT
+29 phoenix_html 2.14.3 MIT
+30 phoenix_live_reload 1.3.0 MIT
+31 phoenix_pubsub 2.0.0 MIT
+32 plug 1.11.0 Apache 2.0
+33 plug_cowboy 2.4.1 Apache 2.0
+34 plug_crypto 1.2.1 Apache 2.0
+35 postgrex 0.15.13 Apache 2.0
+36 prom_ex 1.3.0 MIT
+37 ranch 1.7.1 ISC
+38 retry 0.14.1 Apache 2.0
+39 ssl_verify_fun 1.1.6 MIT
+40 telemetry 0.4.2 Apache 2.0
+41 telemetry_metrics 0.6.1 Apache 2.0
+42 telemetry_metrics_prometheus_core 1.0.1 Apache 2.0
+43 telemetry_poller 0.5.1 Apache 2.0
+44 timex 3.6.3 MIT
+45 tzdata 1.0.5 MIT
+46 unicode_util_compat 0.7.0 Apache 2.0
+47 bunt 0.2.0 MIT
+48 credo 1.5.5 MIT
+49 dialyxir 1.1.0 Apache 2.0
+50 earmark_parser 1.4.12 Apache 2.0
+51 erlex 0.2.6 Apache 2.0
+52 ex_doc 0.24.1 Apache 2.0
+53 file_system 0.2.10 WTFPL
+54 jason 1.2.2 Apache 2.0
+55 makeup 1.0.5 BSD
+56 makeup_elixir 0.15.1 BSD
+57 makeup_erlang 0.1.1 BSD
+58 nimble_parsec 1.1.0 Apache 2.0
+59 warpath 0.6.0 MIT
+-- --------------------------------- ------- ----------
+
+Go
+
+ID Package Link Version
+--- ----------------------------------------------------------- -------------------------------------
+License Type
+------------------------------------------------------
+ 0 github.com/BurntSushi/toml v1.0.0 MIT
+ 1 github.com/adrg/xdg v0.4.0 MIT
+ 2 github.com/alecthomas/chroma v0.10.0 MIT
+ 3 github.com/aymerick/douceur v0.2.0 MIT
+ 4 github.com/charmbracelet/bubbles v0.10.3 MIT
+ 5 github.com/charmbracelet/bubbletea v0.20.0 MIT
+ 6 github.com/charmbracelet/glamour v0.5.0 MIT
+ 7 github.com/charmbracelet/harmonica v0.1.0 MIT
+ 8 github.com/charmbracelet/lipgloss v0.5.0 MIT
+ 9 github.com/containerd/console v1.0.3 Apache 2.0
+ 10 github.com/containerd/containerd v1.6.2 Apache 2.0
+ 11 github.com/dlclark/regexp2 v1.4.0 MIT
+ 12 github.com/docker/distribution v2.8.1 Apache 2.0
+ 13 github.com/docker/docker v20.10.14 Apache 2.0,MIT
+ 14 github.com/docker/go-connections v0.4.0 Apache 2.0
+ 15 github.com/docker/go-units v0.4.0 Apache 2.0
+ 16 github.com/fsnotify/fsnotify v1.5.1 New BSD
+ 17 github.com/gogo/protobuf v1.3.2 New BSD
+ 18 github.com/golang/protobuf v1.5.2 New BSD
+ 19 github.com/gorilla/css v1.0.0 New BSD
+ 20 github.com/hashicorp/hcl v1.0.0 Mozilla Public License 2.0
+ 21 github.com/jackc/chunkreader/v2 v2.0.1 MIT
+ 22 github.com/jackc/pgconn v1.11.0 MIT
+ 23 github.com/jackc/pgio v1.0.0 MIT
+ 24 github.com/jackc/pgpassfile v1.0.0 MIT
+ 25 github.com/jackc/pgproto3/v2 v2.2.0 MIT
+ 26 github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b MIT
+ 27 github.com/jackc/pgtype v1.10.0 MIT
+ 28 github.com/jackc/pgx/v4 v4.15.0 MIT
+ 29 github.com/joho/godotenv v1.4.0 MIT
+ 30 github.com/lucasb-eyer/go-colorful v1.2.0 MIT
+ 31 github.com/magiconair/properties v1.8.6 Simplified BSD
+ 32 github.com/mattn/go-isatty v0.0.14 MIT
+ 33 github.com/mattn/go-runewidth v0.0.13 MIT
+ 34 github.com/microcosm-cc/bluemonday v1.0.18 New BSD
+ 35 github.com/mitchellh/mapstructure v1.4.3 MIT
+ 36 github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 Apache 2.0
+ 37 github.com/morikuni/aec v1.0.0 MIT
+ 38 github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 MIT
+ 39 github.com/muesli/reflow v0.3.0 MIT
+ 40 github.com/muesli/termenv v0.11.1-0.20220212125758-44cd13922739 MIT
+ 41 github.com/olekukonko/tablewriter v0.0.5 MIT
+ 42 github.com/opencontainers/go-digest v1.0.0 Apache 2.0
+ 43 github.com/opencontainers/image-spec v1.0.2 Apache 2.0
+ 44 github.com/pelletier/go-toml v1.9.4 Apache 2.0
+ 45 github.com/pkg/errors v0.9.1 Simplified BSD
+ 46 github.com/rivo/uniseg v0.2.0 MIT
+ 47 github.com/sirupsen/logrus v1.8.1 MIT
+ 48 github.com/spf13/afero v1.8.2 Apache 2.0
+ 49 github.com/spf13/cast v1.4.1 MIT
+ 50 github.com/spf13/cobra v1.4.0 Apache 2.0
+ 51 github.com/spf13/jwalterweatherman v1.1.0 MIT
+ 52 github.com/spf13/pflag v1.0.5 New BSD
+ 53 github.com/spf13/viper v1.10.1 MIT
+ 54 github.com/subosito/gotenv v1.2.0 MIT
+ 55 github.com/withfig/autocomplete-tools/packages/cobra v1.1.3 MIT
+ 56 github.com/yuin/goldmark v1.4.11 MIT
+ 57 github.com/yuin/goldmark-emoji v1.0.1 MIT
+ 58 golang.org/x/crypto v0.0.0-20220321153916-2c7772ba3064 New BSD
+ 59 golang.org/x/net v0.0.0-20220225172249-27dd8689420f New BSD
+ 60 golang.org/x/sys v0.0.0-20220319134239-a9b59b0215f8 New BSD
+ 61 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 New BSD
+ 62 golang.org/x/text v0.3.7 New BSD
+ 63 google.golang.org/genproto v0.0.0-20220323144105-ec3c684e5b14 Apache 2.0
+ 64 google.golang.org/grpc v1.45.0 Apache 2.0
+ 65 google.golang.org/protobuf v1.28.0 New BSD
+ 66 gopkg.in/ini.v1 v1.66.4 Apache 2.0
+ 67 gopkg.in/yaml.v2 v2.4.0 Apache 2.0,MIT
+ 68 github.com/aws/aws-sdk-go-v2 v1.8.0 Apache 2.0,New BSD
+ 69 github.com/aws/aws-sdk-go-v2/config v1.6.0 Apache 2.0
+ 70 github.com/aws/aws-sdk-go-v2/credentials v1.3.2 Apache 2.0
+ 71 github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.4.0 Apache 2.0
+ 72 github.com/aws/aws-sdk-go-v2/internal/ini v1.2.0 Apache 2.0
+ 73 github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.2.2 Apache 2.0
+ 74 github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.5.0 Apache 2.0
+ 75 github.com/aws/aws-sdk-go-v2/service/sso v1.3.2 Apache 2.0
+ 76 github.com/aws/aws-sdk-go-v2/service/sts v1.6.1 Apache 2.0
+ 77 github.com/aws/smithy-go v1.7.0 Apache 2.0
+ 78 github.com/coreos/go-semver v0.3.0 Apache 2.0
+ 79 github.com/coreos/go-systemd/v22 v22.3.2 Apache 2.0
+ 80 github.com/fsnotify/fsnotify v1.4.9 New BSD
+ 81 github.com/gogo/protobuf v1.3.2 New BSD
+ 82 github.com/golang/protobuf v1.5.2 New BSD
+ 83 github.com/hashicorp/hcl v1.0.0 Mozilla Public License 2.0
+ 84 github.com/magiconair/properties v1.8.5 Simplified BSD
+ 85 github.com/mitchellh/mapstructure v1.4.1 MIT
+ 86 github.com/pelletier/go-toml v1.9.3 Apache 2.0
+ 87 github.com/pkg/errors v0.9.1 Simplified BSD
+ 88 github.com/spf13/afero v1.6.0 Apache 2.0
+ 89 github.com/spf13/cast v1.3.1 MIT
+ 90 github.com/spf13/cobra v1.2.1 Apache 2.0,GPLv2,GPLv3,LGPL,MIT,New BSD,Simplified BSD
+ 91 github.com/spf13/jwalterweatherman v1.1.0 MIT
+ 92 github.com/spf13/pflag v1.0.5 New BSD
+ 93 github.com/spf13/viper v1.8.1 MIT
+ 94 github.com/subosito/gotenv v1.2.0 MIT
+ 95 go.etcd.io/etcd/api/v3 v3.5.0 Apache 2.0
+ 96 go.etcd.io/etcd/client/pkg/v3 v3.5.0 Apache 2.0
+ 97 go.etcd.io/etcd/client/v3 v3.5.0 Apache 2.0
+ 98 go.uber.org/atomic v1.9.0 MIT
+ 99 go.uber.org/multierr v1.7.0 MIT
+100 go.uber.org/zap v1.19.0 MIT
+101 golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 New BSD
+102 golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 New BSD
+103 golang.org/x/text v0.3.5 New BSD
+104 google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c Apache 2.0
+105 google.golang.org/grpc v1.38.0 Apache 2.0
+106 google.golang.org/protobuf v1.26.0 New BSD
+107 gopkg.in/ini.v1 v1.62.0 Apache 2.0
+108 gopkg.in/yaml.v2 v2.4.0 Apache 2.0,MIT
+109 github.com/coreos/go-oidc v2.2.1 Apache 2.0
+110 github.com/kelseyhightower/envconfig v1.4.0 MIT
+111 github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35 Apache 2.0
+112 golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 New BSD
+113 golang.org/x/net v0.0.0-20200707034311-ab3426394381 New BSD
+114 golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d New BSD
+115 gopkg.in/square/go-jose.v2 v2.5.1 Apache 2.0,New BSD
+116 cloud.google.com/go v0.67.0 Apache 2.0,New BSD
+117 github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20170623214735-571947b0f240 Apache 2.0
+118 github.com/Masterminds/semver/v3 v3.1.1 MIT
+119 github.com/aymerick/douceur v0.2.0 MIT
+120 github.com/badoux/checkmail v0.0.0-20170203135005-d0a759655d62 MIT
+121 github.com/beevik/etree v1.1.0 Simplified BSD
+122 github.com/coreos/go-oidc/v3 v3.0.0 Apache 2.0
+123 github.com/didip/tollbooth/v5 v5.1.1 MIT
+124 github.com/fatih/color v1.10.0 MIT
+125 github.com/fatih/structs v1.1.0 MIT
+126 github.com/go-chi/chi v4.0.2 MIT
+127 github.com/go-sql-driver/mysql v1.5.0 Mozilla Public License 2.0
+128 github.com/gobuffalo/envy v1.9.0 MIT
+129 github.com/gobuffalo/fizz v1.13.0 MIT
+130 github.com/gobuffalo/flect v0.2.2 MIT
+131 github.com/gobuffalo/github_flavored_markdown v1.1.0 MIT,Simplified BSD
+132 github.com/gobuffalo/helpers v0.6.1 MIT
+133 github.com/gobuffalo/nulls v0.4.0 MIT
+134 github.com/gobuffalo/packd v1.0.0 MIT
+135 github.com/gobuffalo/plush/v4 v4.1.0 MIT
+136 github.com/gobuffalo/pop/v5 v5.3.3 MIT
+137 github.com/gobuffalo/tags/v3 v3.1.0 MIT
+138 github.com/gobuffalo/validate/v3 v3.3.0 MIT
+139 github.com/gofrs/uuid v4.0.0 MIT
+140 github.com/golang-jwt/jwt v3.2.1 MIT
+141 github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e Apache 2.0
+142 github.com/golang/protobuf v1.4.2 New BSD
+143 github.com/googleapis/gax-go/v2 v2.0.5 New BSD
+144 github.com/gorilla/context v1.1.1 New BSD
+145 github.com/gorilla/css v1.0.0 New BSD
+146 github.com/gorilla/securecookie v1.1.1 New BSD
+147 github.com/gorilla/sessions v1.1.1 New BSD
+148 github.com/imdario/mergo v0.0.0-20160216103600-3e95a51e0639 New BSD
+149 github.com/jackc/chunkreader/v2 v2.0.1 MIT
+150 github.com/jackc/pgconn v1.8.0 MIT
+151 github.com/jackc/pgio v1.0.0 MIT
+152 github.com/jackc/pgpassfile v1.0.0 MIT
+153 github.com/jackc/pgproto3/v2 v2.0.7 MIT
+154 github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b MIT
+155 github.com/jackc/pgtype v1.6.2 MIT
+156 github.com/jackc/pgx/v4 v4.10.1 MIT
+157 github.com/jmoiron/sqlx v1.3.1 MIT
+158 github.com/joho/godotenv v1.3.0 MIT
+159 github.com/jonboulle/clockwork v0.2.2 Apache 2.0
+160 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 MIT
+161 github.com/kelseyhightower/envconfig v1.4.0 MIT
+162 github.com/lestrrat-go/jwx v0.9.0 MIT
+163 github.com/luna-duclos/instrumentedsql v1.1.3 MIT
+164 github.com/mattermost/xml-roundtrip-validator v0.1.0 Apache 2.0
+165 github.com/mattn/go-colorable v0.1.8 MIT
+166 github.com/mattn/go-isatty v0.0.12 MIT
+167 github.com/microcosm-cc/bluemonday v1.0.16 New BSD
+168 github.com/mitchellh/mapstructure v1.1.2 MIT
+169 github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 MIT
+170 github.com/netlify/mailme v1.1.1 MIT
+171 github.com/netlify/netlify-commons v0.32.0 MIT
+172 github.com/opentracing/opentracing-go v1.1.0 Apache 2.0
+173 github.com/patrickmn/go-cache v2.1.0 MIT
+174 github.com/philhofer/fwd v1.0.0 MIT
+175 github.com/pkg/errors v0.9.1 Simplified BSD
+176 github.com/rogpeppe/go-internal v1.8.0 New BSD
+177 github.com/rs/cors v1.6.0 MIT
+178 github.com/russellhaering/gosaml2 v0.6.1-0.20210916051624-757d23f1bc28 Apache 2.0
+179 github.com/russellhaering/goxmldsig v1.1.1 Apache 2.0
+180 github.com/sebest/xff v0.0.0-20160910043805-6c115e0ffa35 MIT
+181 github.com/sergi/go-diff v1.1.0 Apache 2.0,MIT
+182 github.com/sethvargo/go-password v0.2.0 MIT
+183 github.com/sirupsen/logrus v1.7.0 MIT
+184 github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d New BSD
+185 github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e New BSD
+186 github.com/spf13/cobra v1.1.3 Apache 2.0,GPLv2,GPLv3,LGPL,MIT,New BSD,Simplified BSD
+187 github.com/spf13/pflag v1.0.5 New BSD
+188 github.com/tinylib/msgp v1.1.0 MIT
+189 go.opencensus.io v0.22.4 Apache 2.0
+190 golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad New BSD
+191 golang.org/x/net v0.0.0-20220121210141-e204ce36a2ba New BSD
+192 golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 New BSD
+193 golang.org/x/sync v0.0.0-20201207232520-09787c993a3a New BSD
+194 golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e New BSD
+195 golang.org/x/text v0.3.7 New BSD
+196 golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1 New BSD
+197 golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 New BSD
+198 google.golang.org/api v0.32.0 New BSD
+199 google.golang.org/genproto v0.0.0-20200929141702-51c3e5b607fe Apache 2.0
+200 google.golang.org/grpc v1.32.0 Apache 2.0
+201 google.golang.org/protobuf v1.25.0 New BSD
+202 gopkg.in/DataDog/dd-trace-go.v1 v1.12.1 New BSD
+203 gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df MIT
+204 gopkg.in/square/go-jose.v2 v2.5.1 Apache 2.0,New BSD
+205 gopkg.in/yaml.v2 v2.4.0 Apache 2.0,MIT
+206 github.com/aws/aws-sdk-go v1.36.20 Apache 2.0,New BSD
+207 github.com/beorn7/perks v1.0.1 MIT
+208 github.com/cespare/xxhash/v2 v2.1.1 MIT
+209 github.com/golang/protobuf v1.4.3 New BSD
+210 github.com/jmespath/go-jmespath v0.4.0 Apache 2.0
+211 github.com/matttproud/golang_protobuf_extensions v1.0.1 Apache 2.0
+212 github.com/prometheus/client_golang v1.9.0 Apache 2.0
+213 github.com/prometheus/client_model v0.2.0 Apache 2.0
+214 github.com/prometheus/common v0.15.0 Apache 2.0,New BSD
+215 github.com/prometheus/procfs v0.2.0 Apache 2.0
+216 github.com/sirupsen/logrus v1.6.0 MIT
+217 golang.org/x/sys v0.0.0-20201214210602-f9fddec55a1e New BSD
+218 google.golang.org/protobuf v1.23.0 New BSD
+219 gopkg.in/yaml.v2 v2.3.0 Apache 2.0,MIT
+--- ----------------------------------------------------------- ------------------------------------- ------------------------------------------------------
diff --git a/www/_blog/2022-03-30-supabase-enterprise.mdx b/www/_blog/2022-03-30-supabase-enterprise.mdx
new file mode 100644
index 00000000000..0a73edfad40
--- /dev/null
+++ b/www/_blog/2022-03-30-supabase-enterprise.mdx
@@ -0,0 +1,278 @@
+---
+title: 'Introducing Supabase Enterprise'
+description: 'Today we are releasing Supabase Enterprise, a suite of features to scale your project.'
+author: rory_wilding,paul_copplestone
+image: launch-week-4/enterprise-day/enterprise-thumb.png
+thumb: launch-week-4/enterprise-day/enterprise-thumb.png
+tags:
+ - launch-week
+ - enterprise
+date: '2022-03-30'
+toc_depth: 3
+---
+
+As our platform continues its rapid adoption within the developer community, we're seeing a growing segment of users building business-critical applications that require enterprise-grade resilience.
+
+
+
+## Enterprise features for everybody
+
+Some features are too good to limit to large customers, so today we're introducing a few enterprise features into the Pro tier.
+
+### Spend caps
+
+
+
+To simplify pricing, we've merged the “Pro” and “Pay as you go” tiers and introduced monthly spend caps to avoid nasty billing surprises.
+These changes are to keep Supabase pricing [predictable, transparent, and developer friendly](/blog/2021/03/29/pricing).
+
+When you upgrade to the Pro Tier, spend caps are turned on by default, limiting your per-project costs to $25 per month.
+We're also retaining our soft limits while we manage the transition to granular spend-caps, so your service will continue to run even if your usage exceeds $25 (we'll contact you directly when you go over the limit). Right now there is a global project spend-cap, and in the future you'll have full control with configurable spend-caps on a “per-feature” basis.
+
+### Database Add-ons
+
+
+
+Today we're releasing self-serve Database Add-ons.
+
+What do you do when your project hits production and your userbase is sky-rocketing?
+Many developers have been asking to scale their projects on-demand. Database Add-ons give everyone this control.
+
+Today, Database Add-ons are available for a small set of customers. We will progressively release this for everyone by the end of next week (Fridy 8th April).
+
+### New Log Explorer
+
+
+
+
+Today we're releasing a brand new [Log Explorer](/docs/guides/platform/logs) in the Supabase Dashboard.
+As big advocates of SQL, we've done what any good Postgres fanatics would do - we're giving you the ability to query your logs using SQL.
+And if you're new to SQL, we have plenty of templates included.
+This is just one of the exciting features we are releasing through our [Logflare acquisition](/blog/2021/12/02/supabase-acquires-logflare).
+Log history is available to every Supabase project:
+
+- Free Tier: 7 days of log history
+- Pro Tier: 30 days of log history
+- Enterprise Tier: 90 days of log history
+
+### Elixir Livebooks
+
+Today we're releasing [Elixir Livebooks for Monitoring](https://github.com/supabase/livebooks), starting with built-in monitoring for PgBouncer, a Postgres connection pooler.
+
+
+
+While our default PgBouncer settings work for 98% of our customers, sometimes they require customization for unique load patterns.
+For example, Supabase is popular with web3 projects where traffic can be very unpredictable - especially when you partner with Snoop Dogg.
+When [sound.xyz](http://sound.xyz) dropped [an NFT with Snoop](https://www.sound.xyz/snoopdogg/death-row-mix-vol-1), we customized their pooler to handle significant load.
+Their database handled over 9,000 simultaneously connections from Vercel's serverless API.
+
+
+
In our MVP, we started with a serverless stack to simplify DevOps. Supabase made it dead simple to get PgBouncer and Postgres running so we could focus on the product.
+
+ As we started hitting scale, they've been crucial to supporting our drops. When Snoop Dogg debuted on Sound, Supabase was able to help us provision our data store to handle the load.
+
+
+ As we rearchitect our backend stack towards scaled microservices, we can be confident that managing Postgres won't be a bottleneck.
+
+
+ Supabase takes out the mental effort from our back-end infrastructure so we can focus on our
+ customers needs.
+
+
+
+If you want to monitor your own PgBouncer connections you can easily [spin up a Livebook](https://github.com/supabase/livebooks) on a free [Fly.io](http://fly.io) instance.
+
+## Enterprise Features
+
+With the release of our new Enterprise Tier, we're announcing a tonne of new features for Enterprise customers.
+
+### Point-in-Time Recovery
+
+
+
+Disaster Recovery is a critical process for any company, even for the most fault-tolerant products. What happens when you accidentally delete that database column
+because of a clumsy `where` clause? Even with Supabase's daily backups, a day's worth of data can be lost if disaster strikes at the most inopportune time.
+
+Every Enterprise project on the Supabase platform has access to Point-in-Time Recovery (PITR), allowing projects to recover from a snapshot mere seconds after a disaster.
+Supabase PITR is powered by [WAL-G](https://github.com/wal-g/wal-g), an open source archival and restoration tool.
+
+### Prometheus Endpoints
+
+
+
+If you run critical infrastructure you likely use Prometheus to monitor your metrics. We've now exposed a Prometheus compatible endpoint for our Enterprise customers.
+This allows them to scrape Supabase metrics into their own metrics infrastructure for real-time monitoring and alerting. This makes monitoring Supabase as easy as building with Supabase.
+
+If you want access to the Prometheus Endpoint, [contact the Supabase Enterprise team](/contact/enterprise) today and we'll get you setup.
+
+### SLAs & Enterprise Support
+
+
+
+For our enterprise customers we know that service level agreements and support response times are also critical features. We continue to treat support as an
+important priority for all tiers, though enterprise users require confidence that our response times meet their business needs. We now offer faster response times for Enterprise customers,
+alongside Priority and Priority Plus support packages for those who need more comprehensive support. You can find further details around our SLAs & support
+[in our documentation](/docs/company/sla).
+
+### Enterprise Pricing
+
+
+
+If you need more information on our Enterprise tier, Pricing, SLAs, Support packages, or want to learn more about how Supabase can meet your scaling needs just
+[contact us](/contact/enterprise).
+
+## Coming soon
+
+We have a lot more Enterprise features under development, available to early-access customers:
+
+### SOC2
+
+We are actively working towards our SOC2 Type II certification by monitoring and patching alerts raised by our security monitoring platform.
+SOC2 covers a wide spectrum of potential security areas and achieving SOC2 would also ease compliance with other major certifications like ISO-27001 and HIPAA.
+
+### Log ingestion
+
+Supabase is now ingesting over 4 billion log events every week, just from the Postgres instances we host on the platform.
+Soon you'll be able to ingest logs and analytics from anywhere directly into your Supabase project.
+
+### Foreign Data Wrappers
+
+Ingesting your logs is one thing, but what about querying them directly from your PostgreSQL database? What if you can figure out how many API requests one of your users made last month?
+Or how many gigabytes of video a user streamed from [Supabase Storage](/storage)? Watch this space!
+
+### Materialized Views
+
+Querying huge datasets can be time-consuming, especially when you are aggregating billions of rows of historical logs. Supabase will make this simple with auto-updating views,
+saved to disk for increased performance. These views update periodically at a cadence that you decide. You'll even be able to fetch these views with your
+[Supabase API](/docs/guides/api)!
+
+## Next steps
+
+Get started today with all of our Enterprise Features on [app.supabase.io](https://app.supabase.io), or [contact the Supabase Enterprise team](/contact/enterprise)
+if you want to access our Enterprise features.
diff --git a/www/components/EnterpriseContactForm.tsx b/www/components/EnterpriseContactForm.tsx
new file mode 100644
index 00000000000..af4c80eda3a
--- /dev/null
+++ b/www/components/EnterpriseContactForm.tsx
@@ -0,0 +1,163 @@
+import { Button, Form, Input, Select } from '@supabase/ui'
+import { useState } from 'react'
+import countries from '~/data/Countries.json'
+import supabase from '~/lib/supabase'
+
+const INITIAL_VALUES = {
+ companyName: '',
+ contactName: '',
+ contactEmail: '',
+ contactPhone: '',
+ companySize: '',
+ details: '',
+ country: 'US',
+}
+
+const validate = (values: any) => {
+ const errors: any = {}
+
+ if (!values.companyName) {
+ errors.companyName = 'Required'
+ }
+
+ if (!values.contactName) {
+ errors.contactName = 'Required'
+ }
+
+ if (!values.contactEmail) {
+ errors.contactEmail = 'Required'
+ } else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.contactEmail)) {
+ errors.contactEmail = 'Invalid email address'
+ }
+
+ return errors
+}
+
+const EnterpriseContactForm = () => {
+ const [formSubmitted, setFormSubmitted] = useState(false)
+
+ const handleFormSubmit = async (values: typeof INITIAL_VALUES, { resetForm }: any) => {
+ const { error } = await supabase.from('enterprise_contacts').insert(
+ [
+ {
+ company_name: values.companyName,
+ contact_name: values.contactName,
+ contact_email: values.contactEmail,
+ contact_phone: values.contactPhone,
+ company_size: values.companySize,
+ details: values.details,
+ country: values.country,
+ },
+ ],
+ { returning: 'minimal' }
+ )
+
+ // TODO: handle error
+ console.log('error:', error)
+ if (!error) {
+ resetForm()
+
+ setFormSubmitted(true)
+ }
+ }
+
+ return (
+