Fix bug in adding the Readwise connection, open Readwise API page in a new window.
This commit is contained in:
@ -56,11 +56,11 @@ export function Readwise(): JSX.Element {
|
||||
<Header>Readwise</Header>
|
||||
</HStack>
|
||||
|
||||
{!isValidating && readwiseIntegration && (
|
||||
{readwiseIntegration && (
|
||||
<RemoveReadwiseForm integration={readwiseIntegration} revalidate={revalidate} />
|
||||
)}
|
||||
|
||||
{!isValidating && !readwiseIntegration && (
|
||||
{!readwiseIntegration && (
|
||||
<AddReadwiseForm />
|
||||
)}
|
||||
|
||||
@ -104,13 +104,14 @@ function AddReadwiseForm(): JSX.Element {
|
||||
}}
|
||||
>
|
||||
<SpanBox>Enter your API key from Readwise below. You can get your token{' '}
|
||||
<Link
|
||||
<a
|
||||
target='_blank'
|
||||
referrerPolicy='no-referrer'
|
||||
style={{ color: '$utilityTextDefault' }}
|
||||
href="https://readwise.io/access_token"
|
||||
target="_blank"
|
||||
>
|
||||
here
|
||||
</Link>.</SpanBox>
|
||||
</a>.</SpanBox>
|
||||
</HStack>
|
||||
|
||||
<FormInput
|
||||
|
||||
@ -14,12 +14,8 @@ type SetIntegrationResult = {
|
||||
}
|
||||
|
||||
type SetIntegrationData = {
|
||||
setIntegration?: SetIntegrationSuccess
|
||||
errorCodes?: unknown[]
|
||||
}
|
||||
|
||||
type SetIntegrationSuccess = {
|
||||
integration: Integration
|
||||
errorCodes?: unknown[]
|
||||
}
|
||||
|
||||
type Integration = {
|
||||
@ -64,5 +60,5 @@ export async function setIntegrationMutation(
|
||||
throw 'Your token is invalid.'
|
||||
throw error
|
||||
}
|
||||
return output.setIntegration?.setIntegration?.integration
|
||||
return output.setIntegration?.integration
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ export default function Integrations(): JSX.Element {
|
||||
},
|
||||
{
|
||||
icon: '/static/icons/readwise.svg',
|
||||
title: 'ReadWise',
|
||||
title: 'Readwise',
|
||||
subText:
|
||||
'Readwise makes it easy to revisit and learn from your ebook & article highlights. Use our Readwise integration to sync your highlights from Omnivore to Readwise.',
|
||||
button: {
|
||||
|
||||
Reference in New Issue
Block a user