[APP-1750] Add the ability to report livestreams (#9654)
* Add report dialog to LiveStatus dialog * Mr Worldwide™ * Bug fix bug fix * Copy update * Simplify parsing * Bump api sdk * update dev-env * Update yarn.lock * Bump api sdk * Refactor useActorStatus, add disablement and appeal dialog * Fix types * Guard against chat profile views * Go live (disabled) * Fix types * Status reports should only go to bsky * Ah yeah let's not override types --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ import {createContext, useContext, useMemo, useState} from 'react'
|
||||
import {type AgeAssuranceRedirectDialogState} from '#/components/ageAssurance/AgeAssuranceRedirectDialog'
|
||||
import * as Dialog from '#/components/Dialog'
|
||||
import {type Screen} from '#/components/dialogs/EmailDialog/types'
|
||||
import {type ReportSubject} from '#/components/moderation/ReportDialog'
|
||||
|
||||
type Control = Dialog.DialogControlProps
|
||||
|
||||
@@ -24,6 +25,7 @@ type ControlsContext = {
|
||||
share?: boolean
|
||||
}>
|
||||
ageAssuranceRedirectDialogControl: StatefulControl<AgeAssuranceRedirectDialogState>
|
||||
reportDialogControl: StatefulControl<{subject: ReportSubject}>
|
||||
}
|
||||
|
||||
const ControlsContext = createContext<ControlsContext | null>(null)
|
||||
@@ -51,6 +53,9 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
}>()
|
||||
const ageAssuranceRedirectDialogControl =
|
||||
useStatefulDialogControl<AgeAssuranceRedirectDialogState>()
|
||||
const reportDialogControl = useStatefulDialogControl<{
|
||||
subject: ReportSubject
|
||||
}>()
|
||||
|
||||
const ctx = useMemo<ControlsContext>(
|
||||
() => ({
|
||||
@@ -60,6 +65,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
emailDialogControl,
|
||||
linkWarningDialogControl,
|
||||
ageAssuranceRedirectDialogControl,
|
||||
reportDialogControl,
|
||||
}),
|
||||
[
|
||||
mutedWordsDialogControl,
|
||||
@@ -68,6 +74,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||
emailDialogControl,
|
||||
linkWarningDialogControl,
|
||||
ageAssuranceRedirectDialogControl,
|
||||
reportDialogControl,
|
||||
],
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user