Skip to content

Commit

Permalink
set up boxtype, playersection and dework profile component
Browse files Browse the repository at this point in the history
  • Loading branch information
Seroxdesign committed Jul 4, 2023
1 parent 71c3fa3 commit fa580d1
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web/components/Player/PlayerSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import React, { forwardRef, useMemo } from 'react';
import { FaTimes } from 'react-icons/fa';
import { BoxMetadata, BoxType, BoxTypes, createBoxKey } from 'utils/boxTypes';

import { PlayerDework } from './Section/PlayerDework';
import { PlayerMeTokens } from './Section/PlayerMeToken';

type Props = {
Expand Down Expand Up @@ -55,6 +56,8 @@ const PlayerSectionInner: React.FC<
return <PlayerCompletedQuests {...{ player, isOwnProfile, editing }} />;
case BoxTypes.PLAYER_METOKENS:
return <PlayerMeTokens {...{ player, isOwnProfile, editing }} />;
case BoxTypes.DEWORK:
return <PlayerDework {...{ player, isOwnProfile, editing }} />;
case BoxTypes.EMBEDDED_URL: {
const { url } = metadata ?? {};
return url ? <EmbeddedUrl {...{ url, editing }} /> : null;
Expand Down
22 changes: 22 additions & 0 deletions packages/web/components/Player/Section/PlayerDework.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Text, Wrap } from '@metafam/ds';
import { ProfileSection } from 'components/Section/ProfileSection';
import { Player } from 'graphql/autogen/types';
import React from 'react';

type Props = {
player: Player;
isOwnProfile?: boolean;
editing?: boolean;
};

export const PlayerDework: React.FC<Props> = ({
player,
isOwnProfile,
editing,
}) => (
<ProfileSection title="MeToken" {...{ isOwnProfile, editing }}>
<Wrap mb={4} justify="center">
<Text>Dework Profile</Text>
</Wrap>
</ProfileSection>
);
1 change: 1 addition & 0 deletions packages/web/components/Player/Section/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const ALL_BOXES = [
BoxTypes.PLAYER_COMPLETED_QUESTS,
BoxTypes.CUSTOM_TEXT,
BoxTypes.PLAYER_METOKENS,
BoxTypes.DEWORK,
// BoxTypes.PLAYER_ACHIEVEMENTS,
// TODO: Add more types of sections
];
Expand Down
1 change: 1 addition & 0 deletions packages/web/utils/boxTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const BoxTypes = {
PLAYER_ROLES: 'player-roles',
PLAYER_COMPLETED_QUESTS: 'completed-quests',
PLAYER_METOKENS: 'meToken',
DEWORK: 'dework',
// Guild Profile Boxes
GUILD_HERO: 'guild-hero',
GUILD_SKILLS: 'guild-skills',
Expand Down

0 comments on commit fa580d1

Please sign in to comment.