mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
## Problem While trying to update `react` to version `19`, I noticed type related errors that can be fixed in version `18`, mostly usage of `JSX.Element` instead of `ReactNode`. ## Solution - Use `ReactNode` instead of `JSX.Element` - Fix some invalid usage of `rechart` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **Refactor** * Standardized React component type annotations across the codebase for improved type consistency and flexibility. * Updated component prop types to accept a broader range of renderable content. * **Bug Fixes** * Adjusted chart layout positioning to improve visual alignment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
81 lines
2.1 KiB
TypeScript
81 lines
2.1 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
import { products } from 'shared-data'
|
|
import { PRODUCT_NAMES, PRODUCT_SHORTNAMES } from 'shared-data/products'
|
|
|
|
export type ProductType = {
|
|
[key: string]: {
|
|
name: string
|
|
icon: string
|
|
description: ReactNode
|
|
description_short: string
|
|
label: string
|
|
url: string
|
|
}
|
|
}
|
|
|
|
const MainProducts: ProductType = {
|
|
[PRODUCT_SHORTNAMES.DATABASE]: {
|
|
name: PRODUCT_NAMES.DATABASE,
|
|
icon: products.database.icon[24],
|
|
description: (
|
|
<>
|
|
Every project is <strong>a full Postgres database</strong>, the world's most trusted
|
|
relational database.
|
|
</>
|
|
),
|
|
description_short: 'Fully portable Postgres database',
|
|
label: '',
|
|
url: '/database',
|
|
},
|
|
[PRODUCT_SHORTNAMES.AUTHENTICATION]: {
|
|
name: PRODUCT_NAMES.AUTHENTICATION,
|
|
icon: products.authentication.icon[24],
|
|
description: (
|
|
<>
|
|
<strong>Add user sign ups and logins</strong>, securing your data with Row Level Security.
|
|
</>
|
|
),
|
|
description_short: 'User Management out of the box',
|
|
label: '',
|
|
url: '/auth',
|
|
},
|
|
[PRODUCT_SHORTNAMES.STORAGE]: {
|
|
name: PRODUCT_NAMES.STORAGE,
|
|
icon: products.storage.icon[24],
|
|
description: (
|
|
<>
|
|
<strong>Store, organize, and serve</strong> large files, from videos to images.
|
|
</>
|
|
),
|
|
description_short: 'Serverless storage for any media',
|
|
label: '',
|
|
url: '/storage',
|
|
},
|
|
[PRODUCT_SHORTNAMES.FUNCTIONS]: {
|
|
name: PRODUCT_NAMES.FUNCTIONS,
|
|
icon: products.functions.icon[24],
|
|
description: (
|
|
<>
|
|
Easily write custom code <strong>without deploying or scaling servers.</strong>
|
|
</>
|
|
),
|
|
description_short: 'Deploy code globally on the edge',
|
|
label: '',
|
|
url: '/edge-functions',
|
|
},
|
|
[PRODUCT_SHORTNAMES.REALTIME]: {
|
|
name: PRODUCT_NAMES.REALTIME,
|
|
icon: products.realtime.icon[24],
|
|
description: (
|
|
<>
|
|
<strong>Build multiplayer experiences</strong> with real-time data synchronization.
|
|
</>
|
|
),
|
|
description_short: 'Synchronize and broadcast events',
|
|
label: '',
|
|
url: '/realtime',
|
|
},
|
|
}
|
|
|
|
export default MainProducts
|