mirror of
https://github.com/supabase/supabase.git
synced 2026-10-12 21:05:06 +03:00
ts ignore all type errors from supabase-js v2
This commit is contained in:
1 parent
9d35c36bf9
commit
01109c8b14
6 files changed
+47
-50
No files matched your search
@@ -42,22 +42,19 @@ const EnterpriseContactForm = () => {
|
||||
const [formSubmitted, setFormSubmitted] = useState<boolean>(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.contactFirstName} ${values.contactLastName}`,
|
||||
contact_first_name: values.contactFirstName,
|
||||
contact_last_name: values.contactLastName,
|
||||
contact_email: values.contactEmail,
|
||||
contact_phone: values.contactPhone,
|
||||
company_size: values.companySize,
|
||||
details: values.details,
|
||||
country: values.country,
|
||||
},
|
||||
],
|
||||
{ returning: 'minimal' }
|
||||
)
|
||||
const { error } = await supabase.from('enterprise_contacts').insert([
|
||||
{
|
||||
company_name: values.companyName,
|
||||
contact_name: `${values.contactFirstName} ${values.contactLastName}`,
|
||||
contact_first_name: values.contactFirstName,
|
||||
contact_last_name: values.contactLastName,
|
||||
contact_email: values.contactEmail,
|
||||
contact_phone: values.contactPhone,
|
||||
company_size: values.companySize,
|
||||
details: values.details,
|
||||
country: values.country,
|
||||
},
|
||||
])
|
||||
|
||||
// TODO: handle error
|
||||
console.log('error:', error)
|
||||
|
||||
@@ -42,22 +42,19 @@ const MfaContactForm = () => {
|
||||
const [formSubmitted, setFormSubmitted] = useState<boolean>(false)
|
||||
|
||||
const handleFormSubmit = async (values: typeof INITIAL_VALUES, { resetForm }: any) => {
|
||||
const { error } = await supabase.from('mfa_early_access_contacts').insert(
|
||||
[
|
||||
{
|
||||
company_name: values.companyName,
|
||||
contact_name: `${values.contactFirstName} ${values.contactLastName}`,
|
||||
contact_first_name: values.contactFirstName,
|
||||
contact_last_name: values.contactLastName,
|
||||
contact_email: values.contactEmail,
|
||||
contact_phone: values.contactPhone,
|
||||
company_size: values.companySize,
|
||||
details: values.details,
|
||||
country: values.country,
|
||||
},
|
||||
],
|
||||
{ returning: 'minimal' }
|
||||
)
|
||||
const { error } = await supabase.from('mfa_early_access_contacts').insert([
|
||||
{
|
||||
company_name: values.companyName,
|
||||
contact_name: `${values.contactFirstName} ${values.contactLastName}`,
|
||||
contact_first_name: values.contactFirstName,
|
||||
contact_last_name: values.contactLastName,
|
||||
contact_email: values.contactEmail,
|
||||
contact_phone: values.contactPhone,
|
||||
company_size: values.companySize,
|
||||
details: values.details,
|
||||
country: values.country,
|
||||
},
|
||||
])
|
||||
|
||||
// TODO: handle error
|
||||
console.log('error:', error)
|
||||
|
||||
@@ -41,24 +41,22 @@ export default function BecomeAPartner({ supabase }: { supabase: SupabaseClient
|
||||
const [formSubmitted, setFormSubmitted] = useState<boolean>(false)
|
||||
|
||||
const handleFormSubmit = async (values: any) => {
|
||||
const { error } = await supabase.from<PartnerContact>('partner_contacts').insert(
|
||||
[
|
||||
{
|
||||
type: values.type,
|
||||
first: values.first,
|
||||
last: values.last,
|
||||
company: values.company,
|
||||
size: Number(values.size),
|
||||
title: values.title,
|
||||
email: values.email,
|
||||
website: values.email.split('@')[1],
|
||||
phone: values.phone,
|
||||
country: values.country,
|
||||
details: values.details,
|
||||
},
|
||||
],
|
||||
{ returning: 'minimal' }
|
||||
)
|
||||
// @ts-ignore
|
||||
const { error } = await supabase.from<PartnerContact>('partner_contacts').insert([
|
||||
{
|
||||
type: values.type,
|
||||
first: values.first,
|
||||
last: values.last,
|
||||
company: values.company,
|
||||
size: Number(values.size),
|
||||
title: values.title,
|
||||
email: values.email,
|
||||
website: values.email.split('@')[1],
|
||||
phone: values.phone,
|
||||
country: values.country,
|
||||
details: values.details,
|
||||
},
|
||||
])
|
||||
|
||||
// TODO: handle error
|
||||
console.log('error:', error)
|
||||
|
||||
@@ -201,6 +201,7 @@ function Partner({ partner }: { partner: Partner }) {
|
||||
|
||||
// This function gets called at build time
|
||||
export const getStaticPaths: GetStaticPaths = async () => {
|
||||
// @ts-ignore
|
||||
const { data: slugs } = await supabase.from<Partner>('partners').select('slug')
|
||||
|
||||
const paths: {
|
||||
@@ -222,6 +223,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
|
||||
// This also gets called at build time
|
||||
export const getStaticProps: GetStaticProps = async ({ params }) => {
|
||||
let { data: partner } = await supabase
|
||||
// @ts-ignore
|
||||
.from<Partner>('partners')
|
||||
.select('*')
|
||||
.eq('slug', params!.slug as string)
|
||||
|
||||
@@ -10,6 +10,7 @@ import TileGrid from '../../../components/Partners/TileGrid'
|
||||
|
||||
export async function getStaticProps() {
|
||||
const { data: partners } = await supabase
|
||||
// @ts-ignore
|
||||
.from<Partner>('partners')
|
||||
.select('*')
|
||||
.eq('approved', true)
|
||||
|
||||
@@ -13,6 +13,7 @@ import TileGrid from '../../../components/Partners/TileGrid'
|
||||
|
||||
export async function getStaticProps() {
|
||||
const { data: partners } = await supabase
|
||||
// @ts-ignore
|
||||
.from<Partner>('partners')
|
||||
.select('*')
|
||||
.eq('approved', true)
|
||||
@@ -57,6 +58,7 @@ function IntegrationPartnersPage(props: Props) {
|
||||
setIsSearching(true)
|
||||
|
||||
let query = supabase
|
||||
// @ts-ignore
|
||||
.from<Partner>('partners')
|
||||
.select('*')
|
||||
.eq('approved', true)
|
||||
|
||||
Reference in new issue
Block a user