remove copilot coment
This commit is contained in:
parent
8e0a06183a
commit
5305116649
|
|
@ -9,7 +9,7 @@ export default function OtherCat({theme, otherCategories, setOtherCategories, se
|
||||||
const [newCat, setNewCat]:any = useState({id: 0, title: '', showEpisodes: false});
|
const [newCat, setNewCat]:any = useState({id: 0, title: '', showEpisodes: false});
|
||||||
const [editPop, setEditPop] = useState(false);
|
const [editPop, setEditPop] = useState(false);
|
||||||
const [catSorted, setCatSorted] = useState(otherCategories);
|
const [catSorted, setCatSorted] = useState(otherCategories);
|
||||||
//sort aplhabetically using a.title and b.title in a useEffect
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
setCatSorted(otherCategories.sort((a:any, b:any) => a.title.localeCompare(b.title)))
|
setCatSorted(otherCategories.sort((a:any, b:any) => a.title.localeCompare(b.title)))
|
||||||
},[otherCategories])
|
},[otherCategories])
|
||||||
|
|
@ -106,7 +106,7 @@ export default function OtherCat({theme, otherCategories, setOtherCategories, se
|
||||||
<Text style={st.switchText}>Show season and episode tracker: </Text>
|
<Text style={st.switchText}>Show season and episode tracker: </Text>
|
||||||
<Switch style={st.switch} onValueChange={handleCheck} value={newCat.showEpisodes}/>
|
<Switch style={st.switch} onValueChange={handleCheck} value={newCat.showEpisodes}/>
|
||||||
</View>
|
</View>
|
||||||
{(editPop)?<Text style={st.delete} onLongPress={handleDelete}>DELETE</Text>:null}
|
{(editPop)?<Text style={st.delete} onLongPress={handleDelete}>long press to delete</Text>:null}
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue