fix type errors
This commit is contained in:
@@ -33,7 +33,9 @@ export function LabelsBtn({
|
||||
|
||||
const updateAdultLabels = (newLabels: AdultSelfLabel[]) => {
|
||||
const newLabel = newLabels[newLabels.length - 1]
|
||||
const filtered = labels.filter(l => !ADULT_CONTENT_LABELS.includes(l))
|
||||
const filtered = labels.filter(
|
||||
l => !ADULT_CONTENT_LABELS.includes(l as AdultSelfLabel),
|
||||
)
|
||||
onChange([
|
||||
...new Set([...filtered, newLabel].filter(Boolean) as SelfLabel[]),
|
||||
])
|
||||
@@ -41,7 +43,9 @@ export function LabelsBtn({
|
||||
|
||||
const updateOtherLabels = (newLabels: OtherSelfLabel[]) => {
|
||||
const newLabel = newLabels[newLabels.length - 1]
|
||||
const filtered = labels.filter(l => !OTHER_SELF_LABELS.includes(l))
|
||||
const filtered = labels.filter(
|
||||
l => !OTHER_SELF_LABELS.includes(l as OtherSelfLabel),
|
||||
)
|
||||
onChange([
|
||||
...new Set([...filtered, newLabel].filter(Boolean) as SelfLabel[]),
|
||||
])
|
||||
|
||||
@@ -297,7 +297,7 @@ export function composerReducer(
|
||||
initMention: undefined,
|
||||
initImageUris: [],
|
||||
initQuoteUri: undefined,
|
||||
initInteractionSettings: action.postInteractionSettings,
|
||||
initInteractionSettings: action.initInteractionSettings,
|
||||
})
|
||||
}
|
||||
case 'mark_saved': {
|
||||
|
||||
Reference in New Issue
Block a user