fixing lint errors

This commit is contained in:
Roland Osborne 2024-11-15 19:24:21 -08:00
parent 99031af550
commit b42d8e425b
2 changed files with 7 additions and 6 deletions

View File

@ -14,7 +14,7 @@ export function Content({ select }: { select: (focus: Focus) => void }) {
const [adding, setAdding] = useState(false)
const [sealed, setSealed] = useState(false)
const [subject, setSubject] = useState('')
const [added, setAdded] = useState([])
const [added, setAdded] = useState([] as string[])
const cards = state.sealSet && sealed ? state.sealable : state.connected
const addTopic = async () => {

View File

@ -24,8 +24,9 @@ export function useContent() {
strings: display.state.strings,
layout: null,
guid: '',
cards: [] as Card[],
connected: [] as Card[],
sealable: [] as Cards[],
sealable: [] as Card[],
sorted: [] as Channel[],
filtered: [] as ChannelParams[],
filter: '',
@ -37,9 +38,9 @@ export function useContent() {
const aval = `${a.handle}/${a.node}`
const bval = `${b.handle}/${b.node}`
if (aval < bval) {
return state.sortAsc ? 1 : -1
return 1;
} else if (aval > bval) {
return state.sortAsc ? -1 : 1
return -1;
}
return 0
}
@ -168,8 +169,8 @@ export function useContent() {
}
const setCards = (cards: Card[]) => {
const sorted = cards.sort(compare)
const connected = []
const sealable = []
const connected = [] as Card[]
const sealable = [] as Card[]
sorted.forEach((card) => {
if (card.status === 'connected') {
connected.push(card)