mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 06:39:09 +03:00
## Context For a project that might have multiple connections to Vercel projects, the Settings -> Integrations -> Vercel section can get really long as we're showing the configuration fields for all projects by default Opting to make each vercel integration a collapsible instead Also improves the "Configure connection" CTA from org integration settings to include an id in the URL, so that redirecting users to the project settings integrations page will land them on the right section ### Before Organization settings -> integrations <img width="500" alt="image" src="https://github.com/user-attachments/assets/f5b9ea2c-0a95-4aff-9416-e16f853d3b8e" /> Project settings -> Integrations <img width="500" alt="image" src="https://github.com/user-attachments/assets/361d5ac7-5919-4103-aaae-cdb5b1a1ce8c" /> ### After Organization settings -> integrations <img width="500" alt="image" src="https://github.com/user-attachments/assets/232cfef7-affe-4f06-a019-7f86ee7805db" /> Project Settings -> Integrations <img width="500" alt="image" src="https://github.com/user-attachments/assets/c3902451-0578-4bfc-8149-2d6f9c276ebd" />
Writing components
Where to create your components
- For components that declare the general structure and layout of a page:
/components/layouts/xxx
- For components that are tightly coupled to a specific interface:
/components/interfaces/xxx
- For components that are meant to be reusable across multiple pages:
/components/ui/xxx
- Note: We're gradually moving files out of the
to-be-cleanedfolder into the respective folders as we refactor
Component structure
- If a component has constants and utility methods that are tightly coupled to itself, keep them close to the component and enclose them in a folder with an
index.tsxas an entry point - Otherwise it can just be a file on its own
- For example:
-
components/ui - SampleComponentA - SampleComponentA.tsx - SampleComponentA.constants.ts - SampleComponentA.utils.ts - SampleComponentA.types.ts - index.ts - SampleComponentB.tsx
-
Template for building components
// Declare the prop types of your component
interface ComponentAProps {
sampleProp: string
}
// Name your component accordingly — use a named export, not a default export
export const ComponentA = ({ sampleProp }: ComponentAProps) => {
return <div>ComponentA: {sampleProp}</div>
}