mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Remove some debug lines
This commit is contained in:
parent
38891567f3
commit
afaf6f2945
19 changed files with 13 additions and 46 deletions
|
|
@ -25,7 +25,6 @@ MdEditor.use(Plugins.TabInsert, {
|
|||
tabMapValue: 1, // note that 1 means a '\t' instead of ' '.
|
||||
})
|
||||
|
||||
console.log()
|
||||
MdEditor.use(Counter)
|
||||
|
||||
type NoteSectionProps = {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ type ErrorLayoutProps = {
|
|||
|
||||
export function ErrorLayout(props: ErrorLayoutProps): JSX.Element {
|
||||
const { viewerData } = useGetViewerQuery()
|
||||
console.log(viewerData?.me)
|
||||
|
||||
return (
|
||||
<VStack alignment="center" distribution="start" css={{ height: '100%' }}>
|
||||
|
|
|
|||
|
|
@ -99,7 +99,6 @@ export const useReaderSettings = (): ReaderSettings => {
|
|||
break
|
||||
case 'setMarginWidth': {
|
||||
const value = Number(arg)
|
||||
console.log('setMarginWidth: ', value)
|
||||
if (value >= 200 && value <= 560) {
|
||||
setMarginWidth(value)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,11 +26,8 @@ export async function addPopularReadMutation(
|
|||
}
|
||||
`
|
||||
|
||||
console.log('addPopularReadMutation', mutation)
|
||||
|
||||
try {
|
||||
const response = await gqlFetcher(mutation, { readName })
|
||||
console.log('response', response)
|
||||
const data = response as AddPopularReadResponse | undefined
|
||||
return data?.addPopularRead?.pageId
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -45,8 +45,6 @@ export async function bulkActionMutation(
|
|||
}
|
||||
`
|
||||
|
||||
console.log('bulkActionbulkActionMutation', mutation)
|
||||
|
||||
try {
|
||||
const response = await gqlFetcher(mutation, {
|
||||
action,
|
||||
|
|
@ -54,7 +52,6 @@ export async function bulkActionMutation(
|
|||
labelIds,
|
||||
expectedCount,
|
||||
})
|
||||
console.log('response', response)
|
||||
const data = response as BulkActionResponse | undefined
|
||||
return data?.bulkAction?.success ?? false
|
||||
} catch (error) {
|
||||
|
|
|
|||
|
|
@ -11,7 +11,9 @@ type CreateNewsletterEmail = {
|
|||
newsletterEmail: NewsletterEmail
|
||||
}
|
||||
|
||||
export async function createNewsletterEmailMutation(): Promise<string | undefined> {
|
||||
export async function createNewsletterEmailMutation(): Promise<
|
||||
string | undefined
|
||||
> {
|
||||
const mutation = gql`
|
||||
mutation createNewsletterEmailMutation {
|
||||
createNewsletterEmail {
|
||||
|
|
@ -29,9 +31,10 @@ export async function createNewsletterEmailMutation(): Promise<string | undefine
|
|||
`
|
||||
|
||||
try {
|
||||
const data = await gqlFetcher(mutation) as CreateNewsletterEmailResult
|
||||
console.log('created email', data)
|
||||
return data.errorCodes ? undefined : data.createNewsletterEmail.newsletterEmail.id
|
||||
const data = (await gqlFetcher(mutation)) as CreateNewsletterEmailResult
|
||||
return data.errorCodes
|
||||
? undefined
|
||||
: data.createNewsletterEmail.newsletterEmail.id
|
||||
} catch (error) {
|
||||
console.log('createNewsletterEmailMutation error', error)
|
||||
return undefined
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ export async function createReminderMutation(
|
|||
linkId: string,
|
||||
reminderType: ReminderType,
|
||||
archiveUntil: boolean,
|
||||
sendNotification: boolean): Promise<string | undefined> {
|
||||
sendNotification: boolean
|
||||
): Promise<string | undefined> {
|
||||
const mutation = gql`
|
||||
mutation createReminderMutation($input: CreateReminderInput!) {
|
||||
createReminder(input: $input) {
|
||||
|
|
@ -35,13 +36,12 @@ export async function createReminderMutation(
|
|||
reminderType,
|
||||
archiveUntil,
|
||||
sendNotification,
|
||||
scheduledAt: new Date()
|
||||
scheduledAt: new Date(),
|
||||
}
|
||||
const data = await gqlFetcher(mutation, { input })
|
||||
console.log('created reminder', data)
|
||||
return 'data'
|
||||
} catch (error) {
|
||||
console.log('createReminder error', error)
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ export async function deleteAccountMutation(
|
|||
}
|
||||
`
|
||||
|
||||
console.log('deleteAccountMutation', mutation)
|
||||
|
||||
try {
|
||||
const response = await gqlFetcher(mutation, { userId })
|
||||
console.log('response', response)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@ export async function deleteRuleMutation(id: string): Promise<Rule> {
|
|||
const data = (await gqlFetcher(mutation, { id })) as DeleteRuleResult
|
||||
const output = data as any
|
||||
const error = data.deleteRule?.errorCodes?.find(() => true)
|
||||
console.log('DATA: ', output.deleteRule)
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ export async function importFromIntegrationMutation(
|
|||
}`
|
||||
|
||||
const data = await gqlFetcher(mutation, { integrationId })
|
||||
console.log('integrationId: ', data)
|
||||
const output = data as ImportFromIntegrationDataResponseData | undefined
|
||||
const error = output?.importFromIntegration?.errorCodes?.find(() => true)
|
||||
console.log('error: ', error)
|
||||
|
|
|
|||
|
|
@ -38,10 +38,7 @@ export async function joinGroupMutation(
|
|||
}
|
||||
`
|
||||
|
||||
console.log('JoinGroupMutation', mutation)
|
||||
|
||||
const response = await gqlFetcher(mutation, { inviteCode })
|
||||
console.log(' -- response', response)
|
||||
const data = response as JoinGroupResponse | undefined
|
||||
const error = data?.errorCodes?.find(() => true)
|
||||
if (error) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,6 @@ export async function markEmailAsItemMutation(
|
|||
}`
|
||||
|
||||
const data = await gqlFetcher(mutation, { recentEmailId })
|
||||
console.log('recentEmailId: ', data)
|
||||
const output = data as MarkEmailAsItemDataResponseData | undefined
|
||||
const error = output?.markEmailAsItem?.errorCodes?.find(() => true)
|
||||
console.log('error: ', error)
|
||||
|
|
|
|||
|
|
@ -31,18 +31,10 @@ export async function setLabelsForHighlight(
|
|||
${labelFragment}
|
||||
`
|
||||
|
||||
console.log(
|
||||
'setting label for highlight id: ',
|
||||
highlightId,
|
||||
'labelIds',
|
||||
labelIds
|
||||
)
|
||||
|
||||
try {
|
||||
const data = (await gqlFetcher(mutation, {
|
||||
input: { highlightId, labelIds },
|
||||
})) as SetLabelsForHighlightResult
|
||||
console.log(' -- errorCodes', data.setLabelsForHighlight.errorCodes)
|
||||
|
||||
return data.setLabelsForHighlight.errorCodes
|
||||
? undefined
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ import { gqlFetcher } from '../networkHelpers'
|
|||
|
||||
export type UpdateLabelInput = {
|
||||
labelId: string
|
||||
name: string,
|
||||
color: string,
|
||||
name: string
|
||||
color: string
|
||||
description?: string
|
||||
}
|
||||
|
||||
|
|
@ -39,9 +39,7 @@ export async function updateLabelMutation(
|
|||
|
||||
try {
|
||||
const data = await gqlFetcher(mutation)
|
||||
console.log(input, data);
|
||||
const output = data as any
|
||||
console.log(output)
|
||||
return output?.updatedLabel
|
||||
} catch (err) {
|
||||
return undefined
|
||||
|
|
|
|||
|
|
@ -32,10 +32,8 @@ export async function uploadImportFileRequestMutation(
|
|||
}`
|
||||
|
||||
const data = await gqlFetcher(mutation, { type, contentType })
|
||||
console.log('UploadImportFile: ', data)
|
||||
const output = data as UploadImportFileResponseData | undefined
|
||||
const error = output?.uploadImportFile?.errorCodes?.find(() => true)
|
||||
console.log('error: ', error)
|
||||
if (error) {
|
||||
throw error
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ export function useGetArticleOriginalHtmlQuery({
|
|||
)
|
||||
|
||||
const resultData: ArticleData | undefined = data as ArticleData
|
||||
console.log('RESULT', JSON.stringify(data))
|
||||
|
||||
return resultData?.article.article.originalHtml
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,8 +53,6 @@ export function useGetIntegrationsQuery(): IntegrationsQueryResponse {
|
|||
`
|
||||
|
||||
const { data, mutate, isValidating } = useSWR(query, publicGqlFetcher)
|
||||
console.log('integrations data', data)
|
||||
|
||||
try {
|
||||
if (data) {
|
||||
const result = data as IntegrationsQueryResponseData
|
||||
|
|
|
|||
|
|
@ -62,8 +62,6 @@ export function useGetWebhooksQuery(): WebhooksQueryResponse {
|
|||
`
|
||||
|
||||
const { data, mutate, isValidating } = useSWR(query, publicGqlFetcher)
|
||||
console.log('webhooks data', data)
|
||||
|
||||
try {
|
||||
if (data) {
|
||||
const result = data as WebhooksQueryResponseData
|
||||
|
|
|
|||
|
|
@ -65,7 +65,6 @@ export default function Api(): JSX.Element {
|
|||
name: 'expiredAt',
|
||||
required: true,
|
||||
onChange: (e) => {
|
||||
console.log('onChange: ', e)
|
||||
let additionalDays = 0
|
||||
switch (e.target.value) {
|
||||
case 'in 7 days':
|
||||
|
|
|
|||
Loading…
Reference in a new issue