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