Remove highlightsBaseURL as it is no longer used
This commit is contained in:
@ -94,7 +94,6 @@ const App = () => {
|
||||
labels={window.omnivoreArticle.labels}
|
||||
isAppleAppEmbed={true}
|
||||
highlightBarDisabled={!window.enableHighlightBar}
|
||||
highlightsBaseURL="https://example.com"
|
||||
fontSize={window.fontSize ?? 18}
|
||||
fontFamily={window.fontFamily ?? 'inter'}
|
||||
margin={window.margin}
|
||||
|
||||
@ -23,7 +23,6 @@ type ArticleContainerProps = {
|
||||
articleMutations: ArticleMutations
|
||||
isAppleAppEmbed: boolean
|
||||
highlightBarDisabled: boolean
|
||||
highlightsBaseURL: string
|
||||
margin?: number
|
||||
fontSize?: number
|
||||
fontFamily?: string
|
||||
@ -378,7 +377,6 @@ export function ArticleContainer(props: ArticleContainerProps): JSX.Element {
|
||||
articleAuthor={props.article.author ?? ''}
|
||||
articleId={props.article.id}
|
||||
isAppleAppEmbed={props.isAppleAppEmbed}
|
||||
highlightsBaseURL={props.highlightsBaseURL}
|
||||
highlightBarDisabled={props.highlightBarDisabled}
|
||||
showHighlightsModal={props.showHighlightsModal}
|
||||
setShowHighlightsModal={props.setShowHighlightsModal}
|
||||
|
||||
@ -36,7 +36,6 @@ type HighlightsLayerProps = {
|
||||
isAppleAppEmbed: boolean
|
||||
highlightBarDisabled: boolean
|
||||
showHighlightsModal: boolean
|
||||
highlightsBaseURL: string
|
||||
scrollToHighlight: MutableRefObject<string | null>
|
||||
setShowHighlightsModal: React.Dispatch<React.SetStateAction<boolean>>
|
||||
articleMutations: ArticleMutations
|
||||
@ -142,24 +141,6 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
||||
[highlights, highlightLocations]
|
||||
)
|
||||
|
||||
const handleNativeShare = useCallback(
|
||||
(highlightID: string) => {
|
||||
navigator
|
||||
?.share({
|
||||
title: props.articleTitle,
|
||||
url: `${props.highlightsBaseURL}/${highlightID}`,
|
||||
})
|
||||
.then(() => {
|
||||
setFocusedHighlight(undefined)
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error)
|
||||
setFocusedHighlight(undefined)
|
||||
})
|
||||
},
|
||||
[props.articleTitle, props.highlightsBaseURL]
|
||||
)
|
||||
|
||||
const openNoteModal = useCallback(
|
||||
(inputs: HighlightActionProps) => {
|
||||
// First try to send a signal to the ios app
|
||||
@ -615,23 +596,6 @@ export function HighlightsLayer(props: HighlightsLayerProps): JSX.Element {
|
||||
)
|
||||
}
|
||||
|
||||
if (
|
||||
highlightModalAction?.highlightModalAction == 'share' &&
|
||||
highlightModalAction.highlight
|
||||
) {
|
||||
return (
|
||||
<ShareHighlightModal
|
||||
url={`${props.highlightsBaseURL}/${highlightModalAction.highlight.shortId}`}
|
||||
title={props.articleTitle}
|
||||
author={props.articleAuthor}
|
||||
highlight={highlightModalAction.highlight}
|
||||
onOpenChange={() => {
|
||||
setHighlightModalAction({ highlightModalAction: 'none' })
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
// Display the button bar if we are not in the native app and there
|
||||
// is a focused highlight or selection data
|
||||
if (!props.highlightBarDisabled && (focusedHighlight || selectionData)) {
|
||||
|
||||
@ -339,7 +339,6 @@ export default function Home(): JSX.Element {
|
||||
article={article}
|
||||
isAppleAppEmbed={false}
|
||||
highlightBarDisabled={false}
|
||||
highlightsBaseURL={`${webBaseURL}/${viewerData.me?.profile?.username}/${slug}/highlights`}
|
||||
fontSize={readerSettings.fontSize}
|
||||
margin={readerSettings.marginWidth}
|
||||
lineHeight={readerSettings.lineHeight}
|
||||
|
||||
@ -95,7 +95,6 @@ function AppArticleEmbedContent(
|
||||
article={articleData.article.article}
|
||||
isAppleAppEmbed={true}
|
||||
highlightBarDisabled={props.highlightBarDisabled}
|
||||
highlightsBaseURL={`${webBaseURL}/${props.username}/${props.slug}/highlights`}
|
||||
fontSize={props.fontSize}
|
||||
margin={props.margin}
|
||||
fontFamily={props.fontFamily}
|
||||
|
||||
Reference in New Issue
Block a user