mirror of
https://github.com/d0zingcat/nextjs-notion-starter-kit.git
synced 2026-05-13 23:16:47 +00:00
13 lines
335 B
TypeScript
13 lines
335 B
TypeScript
import { Block } from 'notion-types'
|
|
import { defaultMapImageUrl } from 'react-notion-x'
|
|
|
|
import { defaultPageIcon, defaultPageCover } from './config'
|
|
|
|
export const mapImageUrl = (url: string, block: Block) => {
|
|
if (url === defaultPageCover || url === defaultPageIcon) {
|
|
return url
|
|
}
|
|
|
|
return defaultMapImageUrl(url, block)
|
|
}
|