mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-24 19:39:11 +00:00
fix(PickerCategory): sort roles by position
This commit is contained in:
parent
51ae64e664
commit
4159622226
1 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@ import {
|
|||
Role as RPCRole,
|
||||
RoleSafety,
|
||||
} from 'roleypoly/common/types';
|
||||
import { sortBy } from 'roleypoly/common/utils/sortBy';
|
||||
import { Role } from 'roleypoly/design-system/atoms/role';
|
||||
import { AmbientLarge, LargeText } from 'roleypoly/design-system/atoms/typography';
|
||||
import styled from 'styled-components';
|
||||
|
@ -50,7 +51,7 @@ export const PickerCategory = (props: CategoryProps) => (
|
|||
)}
|
||||
</Head>
|
||||
<Category>
|
||||
{props.roles.map((role, idx) => (
|
||||
{sortBy(props.roles, 'position').map((role, idx) => (
|
||||
<Container key={idx}>
|
||||
<Role
|
||||
role={role}
|
||||
|
|
Loading…
Add table
Reference in a new issue