Skip to content

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

Fix theme

Joshen Limf4922f827a7c
diff --git a/studio/components/layouts/SignInLayout/SignInLayout.tsx b/studio/components/layouts/SignInLayout/SignInLayout.tsx
index 6c8e77de0d9..36338c437b9 100644
--- a/studio/components/layouts/SignInLayout/SignInLayout.tsx
+++ b/studio/components/layouts/SignInLayout/SignInLayout.tsx
@@ -1,4 +1,5 @@
import { useQueryClient } from '@tanstack/react-query'
+import { useTheme } from 'common'
import { useStore } from 'hooks'
import { usePushNext } from 'hooks/misc/useAutoAuthRedirect'
import { BASE_PATH, IS_PLATFORM } from 'lib/constants'
@@ -26,9 +27,8 @@ const SignInLayout = ({
children,
}: PropsWithChildren<SignInLayoutProps>) => {
const pushNext = usePushNext()
- const { ui } = useStore()
const queryClient = useQueryClient()
- const { theme } = ui
+ const { isDarkMode } = useTheme()
useEffect(() => {
const searchParams = new URLSearchParams(location.search)
@@ -97,7 +97,7 @@ const SignInLayout = ({
<a>
<Image
src={
- theme == 'dark'
+ isDarkMode
? `${BASE_PATH}/img/supabase-dark.svg`
: `${BASE_PATH}/img/supabase-light.svg`
}
diff --git a/studio/pages/404.tsx b/studio/pages/404.tsx
index 853a48bda64..d616cc2d0ad 100644
--- a/studio/pages/404.tsx
+++ b/studio/pages/404.tsx
@@ -6,11 +6,10 @@ import { Button } from 'ui'
import { useStore } from 'hooks'
import { BASE_PATH } from 'lib/constants'
+import { useTheme } from 'common'
const Error404: NextPage = ({}) => {
- const { ui } = useStore()
- const { theme } = ui
-
+ const { isDarkMode } = useTheme()
const [show404, setShow404] = useState<boolean>(false)
useEffect(() => {
@@ -28,7 +27,7 @@ const Error404: NextPage = ({}) => {
<a href="/projects">
<Image
src={
- theme == 'dark'
+ isDarkMode
? `${BASE_PATH}/img/supabase-dark.svg`
: `${BASE_PATH}/img/supabase-light.svg`
}
diff --git a/studio/pages/500.tsx b/studio/pages/500.tsx
index ca0f728e0f3..5790b7dda1e 100644
--- a/studio/pages/500.tsx
+++ b/studio/pages/500.tsx
@@ -7,11 +7,12 @@ import { observer } from 'mobx-react-lite'
import { useStore } from 'hooks'
import { auth, STORAGE_KEY } from 'lib/gotrue'
+import { useTheme } from 'common'
const Error500: NextPage = () => {
const router = useRouter()
const { ui } = useStore()
- const { theme } = ui
+ const { isDarkMode } = useTheme()
const onClickLogout = async () => {
await auth.signOut()
@@ -29,7 +30,7 @@ const Error500: NextPage = () => {
<a href="/projects">
<Image
src={
- theme == 'dark'
+ isDarkMode
? `${router.basePath}/img/supabase-dark.svg`
: `${router.basePath}/img/supabase-light.svg`
}