mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Set default enabled=false
This commit is contained in:
parent
29797829b4
commit
c18b41f184
2 changed files with 3 additions and 7 deletions
|
|
@ -18,10 +18,6 @@ interface WebhookData {
|
|||
}
|
||||
|
||||
export function useGetWebhookQuery(id: string): WebhookQueryResponse {
|
||||
if (!id) {
|
||||
return {}
|
||||
}
|
||||
|
||||
const query = gql`
|
||||
query GetWebhook($id: ID!) {
|
||||
webhook(id: $id) {
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default function Webhooks(): JSX.Element {
|
|||
'PAGE_CREATED',
|
||||
'HIGHLIGHT_CREATED',
|
||||
])
|
||||
const [enabled, setEnabled] = useState(true)
|
||||
const [enabled, setEnabled] = useState(false)
|
||||
const [formInputs, setFormInputs] = useState<FormInputProps[]>([
|
||||
{
|
||||
label: 'URL',
|
||||
|
|
@ -61,7 +61,7 @@ export default function Webhooks(): JSX.Element {
|
|||
label: 'Event Types',
|
||||
name: 'eventTypes',
|
||||
disabled: true,
|
||||
value: eventTypes.join(', '),
|
||||
value: webhook.eventTypes.join(', '),
|
||||
},
|
||||
{
|
||||
label: 'Enabled',
|
||||
|
|
@ -102,7 +102,7 @@ export default function Webhooks(): JSX.Element {
|
|||
id: onEditId,
|
||||
url,
|
||||
eventTypes,
|
||||
enabled: enabled || false,
|
||||
enabled: enabled,
|
||||
})
|
||||
if (result) {
|
||||
showSuccessToast('Updated', { position: 'bottom-right' })
|
||||
|
|
|
|||
Loading…
Reference in a new issue