mirror of
https://github.com/supabase/supabase.git
synced 2026-10-09 03:15:06 +03:00
chore: Enhance the title tag on dashboard pages
Co-authored-by: BikashSah999 <51731962+BikashSah999@users.noreply.github.com>
This commit is contained in:
1 parent
37099180c3
commit
70a7d99463
3 files changed
+14
-2
No files matched your search
@@ -26,6 +26,7 @@ export interface ProjectLayoutProps {
|
||||
hideHeader?: boolean
|
||||
hideIconBar?: boolean
|
||||
children: ReactNode
|
||||
selectedTable?: string
|
||||
}
|
||||
|
||||
const ProjectLayout = ({
|
||||
@@ -36,12 +37,13 @@ const ProjectLayout = ({
|
||||
children,
|
||||
hideHeader = false,
|
||||
hideIconBar = false,
|
||||
selectedTable,
|
||||
}: ProjectLayoutProps) => {
|
||||
const { ui } = useStore()
|
||||
const router = useRouter()
|
||||
const { ref: projectRef } = useParams()
|
||||
const ongoingIncident = useFlag('ongoingIncident')
|
||||
const projectName = ui.selectedProject?.name
|
||||
const organizationName = ui.selectedOrganization?.name
|
||||
|
||||
const isPaused = ui.selectedProject?.status === PROJECT_STATUS.INACTIVE
|
||||
const ignorePausedState =
|
||||
@@ -52,7 +54,13 @@ const ProjectLayout = ({
|
||||
<ProjectContextProvider projectRef={projectRef}>
|
||||
<Head>
|
||||
<title>
|
||||
{title ? `${title} | Supabase` : projectName ? `${projectName} | Supabase` : 'Supabase'}
|
||||
{title
|
||||
? `${title} | Supabase`
|
||||
: selectedTable
|
||||
? `${selectedTable} | ${organizationName} | Supabase`
|
||||
: organizationName
|
||||
? `${organizationName} | Supabase`
|
||||
: 'Supabase'}
|
||||
</title>
|
||||
<meta name="description" content="Supabase Studio" />
|
||||
</Head>
|
||||
|
||||
@@ -19,6 +19,7 @@ import useTableRowsPrefetchWrapper from './TableEditorLayout.utils'
|
||||
|
||||
export interface TableEditorLayoutProps {
|
||||
selectedSchema?: string
|
||||
selectedTable?: string
|
||||
onSelectSchema: (schema: string) => void
|
||||
onAddTable: () => void
|
||||
onEditTable: (table: Entity) => void
|
||||
@@ -28,6 +29,7 @@ export interface TableEditorLayoutProps {
|
||||
|
||||
const TableEditorLayout = ({
|
||||
selectedSchema,
|
||||
selectedTable,
|
||||
onSelectSchema = noop,
|
||||
onAddTable = noop,
|
||||
onEditTable = noop,
|
||||
@@ -123,6 +125,7 @@ const TableEditorLayout = ({
|
||||
return (
|
||||
<ProjectLayout
|
||||
product="Table editor"
|
||||
selectedTable={selectedTable}
|
||||
productMenu={
|
||||
<TableEditorMenu
|
||||
selectedSchema={selectedSchema}
|
||||
|
||||
@@ -270,6 +270,7 @@ const TableEditorPage: NextPageWithLayout = () => {
|
||||
return (
|
||||
<TableEditorLayout
|
||||
selectedSchema={selectedSchema}
|
||||
selectedTable={selectedTable?.name}
|
||||
onSelectSchema={setSelectedSchema}
|
||||
onAddTable={onAddTable}
|
||||
onEditTable={onEditTable}
|
||||
|
||||
Reference in new issue
Block a user