···107}
108109/**
110- * Kinda hacky, but we want For Your or Discover to appear as the first pinned
111 * feed after Following
112 */
113export function sortPrimaryAlgorithmFeeds(uris: string[]) {
114 return uris.sort((a, b) => {
115- if (a === PRIMARY_FEEDS[0].uri) {
116- return -1
117- }
118- if (b === PRIMARY_FEEDS[0].uri) {
119- return 1
120- }
121- if (a === PRIMARY_FEEDS[1].uri) {
122 return -1
123 }
124- if (b === PRIMARY_FEEDS[1].uri) {
125 return 1
126 }
127 return a.localeCompare(b)
···107}
108109/**
110+ * Kinda hacky, but we want Discover to appear as the first pinned
111 * feed after Following
112 */
113export function sortPrimaryAlgorithmFeeds(uris: string[]) {
114 return uris.sort((a, b) => {
115+ if (a === PRIMARY_FEEDS[0]?.uri) {
000000116 return -1
117 }
118+ if (b === PRIMARY_FEEDS[0]?.uri) {
119 return 1
120 }
121 return a.localeCompare(b)