mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-04-25 03:49: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,
|
Role as RPCRole,
|
||||||
RoleSafety,
|
RoleSafety,
|
||||||
} from 'roleypoly/common/types';
|
} from 'roleypoly/common/types';
|
||||||
|
import { sortBy } from 'roleypoly/common/utils/sortBy';
|
||||||
import { Role } from 'roleypoly/design-system/atoms/role';
|
import { Role } from 'roleypoly/design-system/atoms/role';
|
||||||
import { AmbientLarge, LargeText } from 'roleypoly/design-system/atoms/typography';
|
import { AmbientLarge, LargeText } from 'roleypoly/design-system/atoms/typography';
|
||||||
import styled from 'styled-components';
|
import styled from 'styled-components';
|
||||||
|
@ -50,7 +51,7 @@ export const PickerCategory = (props: CategoryProps) => (
|
||||||
)}
|
)}
|
||||||
</Head>
|
</Head>
|
||||||
<Category>
|
<Category>
|
||||||
{props.roles.map((role, idx) => (
|
{sortBy(props.roles, 'position').map((role, idx) => (
|
||||||
<Container key={idx}>
|
<Container key={idx}>
|
||||||
<Role
|
<Role
|
||||||
role={role}
|
role={role}
|
||||||
|
|
Loading…
Add table
Reference in a new issue