Skip to content

Commit

Permalink
feat(connect-kit/x-settings): update manage-operators
Browse files Browse the repository at this point in the history
add `newbie villa` tag
  • Loading branch information
runjuu committed Mar 11, 2023
1 parent 9984509 commit 7e1da17
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/connect-kit/src/hooks/character-operator/const.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const SCOPE_KEY = ["indexer", "operator-sync"];

export const NEWBIE_VILLA_OPERATOR_ADDRESS =
"0x51e2368d60bc329dbd5834370c1e633be60c1d6d";

export const SCOPE_KEY_CHARACTER_OPERATOR = ({
operator,
characterId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { usePrimaryCharacter } from "@crossbell/indexer";

import commonStyles from "../../../styles.module.css";
import {
NEWBIE_VILLA_OPERATOR_ADDRESS,
OP_SIGN_OPERATOR_ADDRESS,
useCharacterOperatorPermissions,
X_SYNC_OPERATOR_ADDRESS,
Expand Down Expand Up @@ -130,6 +131,7 @@ export function useOperatorAvatar(
);

if (
isAddressEqual(characterOperator.operator, NEWBIE_VILLA_OPERATOR_ADDRESS) ||
isAddressEqual(characterOperator.operator, X_SYNC_OPERATOR_ADDRESS) ||
isAddressEqual(characterOperator.operator, OP_SIGN_OPERATOR_ADDRESS)
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
OP_SIGN_OPERATOR_ADDRESS,
X_SYNC_OPERATOR_ADDRESS,
useGetCharacterOperators,
NEWBIE_VILLA_OPERATOR_ADDRESS,
} from "../../../hooks";

import styles from "./list.module.css";
Expand Down Expand Up @@ -81,6 +82,17 @@ function getTags(characterOperator: CharacterOperatorEntity): ItemTag[] | null {
];
}

if (
isAddressEqual(characterOperator.operator, NEWBIE_VILLA_OPERATOR_ADDRESS)
) {
return [
{
title: "Newbie Villa",
style: { background: "#F6C549", color: "#fff" },
},
];
}

return [
{ title: "Unknown", style: { background: "#A9AAAB", color: "#fff" } },
];
Expand Down

0 comments on commit 7e1da17

Please sign in to comment.