Skip to content

Getting personas sorted in the Quick Personas #3

Description

@RaidersPlay

Wanted to get the personas sorted as I have different descriptions for some personas and it would be nicer to have them grouped together.
With some AI assistance, I got a code that seems to work fine.
Replace line 46 with the below 7 lines of code. (1st line is the same as line 46, used as reference where to paste)

const userAvatars = await getUserAvatars(false);

const userAvatars = await getUserAvatars(false);

userAvatars.sort((a, b) => {
const nameA = (power_user.personas[a] || a).toLowerCase();
const nameB = (power_user.personas[b] || b).toLowerCase();
return nameA.localeCompare(nameB);
});

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions