Skip to content

Commit

Permalink
Oppdatert sorteringslogikk
Browse files Browse the repository at this point in the history
  • Loading branch information
matsbyfl committed Oct 10, 2023
1 parent 7766d14 commit b41a1c0
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { log } from 'console'
import { useState } from 'react'
import { useParams } from 'react-router'

Expand Down Expand Up @@ -169,8 +170,10 @@ export const VurderVilkår: React.FC = () => {
if (!a) return 1
if (!b) return -1

if (a.toLocaleLowerCase().startsWith('frtl') && b.startsWith('§')) return -1
if (b.toLocaleLowerCase().startsWith('frtl') && a.startsWith('§')) return 1
console.log('a', a, 'b', b)

if (a.toLocaleLowerCase().startsWith('frtl')) return -1
if (b.toLocaleLowerCase().startsWith('frtl')) return 1

return a.localeCompare(b)
}
Expand Down

0 comments on commit b41a1c0

Please sign in to comment.