Skip to content

Commit

Permalink
feat(sanity): remove logo from config type
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanwikner authored and rexxars committed Sep 23, 2022
1 parent e5d8ccd commit 7bfe3b1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
9 changes: 0 additions & 9 deletions packages/sanity/src/config/prepareConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,6 @@ import type {LogoProps, ToolMenuProps, LayoutProps, NavbarProps} from './compone

type InternalSource = WorkspaceSummary['__internal']['sources'][number]

function normalizeLogo(
logo: React.ComponentType | React.ElementType | undefined
): JSX.Element | undefined {
if (isValidElementType(logo)) return createElement(logo)
if (isValidElement(logo)) return logo
return undefined
}

function normalizeIcon(
icon: React.ComponentType | React.ElementType | undefined,
title: string,
Expand Down Expand Up @@ -166,7 +158,6 @@ export function prepareConfig(config: Config): PreparedConfig {
basePath: rootSource.basePath || '/',
dataset: rootSource.dataset,
schema: resolvedSources[0].schema,
logo: normalizeLogo(rootSource.logo),
icon: normalizeIcon(
rootSource.icon,
title,
Expand Down
2 changes: 0 additions & 2 deletions packages/sanity/src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@ export interface WorkspaceSummary {
type: 'workspace-summary'
name: string
title: string
logo?: React.ReactNode
icon: React.ReactNode
subtitle?: string
basePath: string
Expand Down Expand Up @@ -375,7 +374,6 @@ export interface Workspace extends Omit<Source, 'type'> {
type: 'workspace'
basePath: string
subtitle?: string
logo?: React.ReactNode
icon: React.ReactNode
/**
* @alpha
Expand Down

0 comments on commit 7bfe3b1

Please sign in to comment.