Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Update UI packages

Joshen Lima94d58abf14c
diff --git a/package-lock.json b/package-lock.json
index 6a059a736e8..287a906b65d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38401,6 +38401,8 @@
"@sentry/nextjs": "^6.17.4",
"@stripe/react-stripe-js": "^1.7.0",
"@stripe/stripe-js": "^1.25.0",
+ "@supabase/auth-helpers-nextjs": "^0.5.6",
+ "@supabase/auth-helpers-react": "^0.3.1",
"@supabase/react-data-grid": "^7.1.0-beta.7",
"@supabase/shared-types": "^0.1.40",
"@supabase/supabase-js": "^2.13.0",
@@ -65242,6 +65244,8 @@
"@storybook/testing-library": "^0.0.9",
"@stripe/react-stripe-js": "^1.7.0",
"@stripe/stripe-js": "^1.25.0",
+ "@supabase/auth-helpers-nextjs": "^0.5.6",
+ "@supabase/auth-helpers-react": "^0.3.1",
"@supabase/postgres-meta": "^0.60.7",
"@supabase/react-data-grid": "^7.1.0-beta.7",
"@supabase/shared-types": "^0.1.40",
diff --git a/packages/ui/src/components/Command/CommandMenu.tsx b/packages/ui/src/components/Command/CommandMenu.tsx
index 8dc4608da94..163c1a7d69d 100644
--- a/packages/ui/src/components/Command/CommandMenu.tsx
+++ b/packages/ui/src/components/Command/CommandMenu.tsx
@@ -51,9 +51,11 @@ const iconPicker: { [key: string]: React.ReactNode } = {
products: <IconColumns />,
}
-const projectRef = ''
+interface CommandMenuProps {
+ projectRef?: string
+}
-const CommandMenu = () => {
+const CommandMenu = ({ projectRef }: CommandMenuProps) => {
const router = useRouter()
const commandInputRef = useRef<ElementRef<typeof CommandInput>>(null)
diff --git a/packages/ui/src/components/Command/CommandMenuProvider.tsx b/packages/ui/src/components/Command/CommandMenuProvider.tsx
index 3f94ba1e78d..591f00dcf36 100644
--- a/packages/ui/src/components/Command/CommandMenuProvider.tsx
+++ b/packages/ui/src/components/Command/CommandMenuProvider.tsx
@@ -35,16 +35,20 @@ export interface CommandMenuActions {
toggleTheme: UseThemeProps['toggleTheme']
}
-const CommandMenuProvider = ({
- children,
- site,
- MarkdownHandler,
-}: PropsWithChildren<{
+export interface CommandMenuProviderProps {
site: 'studio' | 'docs'
+ projectRef?: string
// to do: remove this prop
// this is a temporary hack as ReactMarkdown fails our jest tests if we import the package within this UI package
MarkdownHandler: (props: any) => React.ReactNode
-}>) => {
+}
+
+const CommandMenuProvider = ({
+ children,
+ site,
+ projectRef,
+ MarkdownHandler,
+}: PropsWithChildren<CommandMenuProviderProps>) => {
const [isOpen, setIsOpen] = useState(false)
const [isLoading, setIsLoading] = useState(false)
const [search, setSearch] = React.useState('')
@@ -76,7 +80,7 @@ const CommandMenuProvider = ({
}}
>
{children}
- <CommandMenu />
+ <CommandMenu projectRef={projectRef} />
</CommandMenuContext.Provider>
)
}