diff --git a/packages/web/pages/guild/[guildname].tsx b/packages/web/pages/guild/[guildname].tsx index eea50d4b..ab5b8153 100644 --- a/packages/web/pages/guild/[guildname].tsx +++ b/packages/web/pages/guild/[guildname].tsx @@ -11,6 +11,8 @@ import { import Error from 'next/error'; import { useRouter } from 'next/router'; import React from 'react'; +import { BOX_TYPE } from 'utils/boxTypes'; +import { getPlayerCoverImageFull } from 'utils/playerHelpers'; import { PageContainer } from '../../components/Container'; import { GuildHero } from '../../components/Guild/GuildHero'; @@ -20,9 +22,20 @@ import { HeadComponent } from '../../components/Seo'; type Props = InferGetStaticPropsType; -const GuildPage: React.FC = ({ guild, quests }) => { +const GuildPage: React.FC = ({ guild }) => { const router = useRouter(); + // Hidden until implemented + // BOX_TYPE.GUILD.SKILLS, + // BOX_TYPE.GUILD.STATS, + // BOX_TYPE.GUILD.QUESTS, + // BOX_TYPE.GUILD.GALLERY, + + const boxes = [ + [BOX_TYPE.GUILD.PLAYERS], + [BOX_TYPE.GUILD.ANNOUNCEMENTS, BOX_TYPE.GUILD.LINKS], + ]; + if (router.isFallback) { return ; } @@ -31,72 +44,112 @@ const GuildPage: React.FC = ({ guild, quests }) => { return ; } + const getBox = (name: string): React.ReactNode => { + switch (name) { + case BOX_TYPE.GUILD.PLAYERS: + return ; + case BOX_TYPE.GUILD.LINKS: + return ; + case BOX_TYPE.GUILD.ANNOUNCEMENTS: + return ( + +

No announcements.

+
+ ); + default: + return <>; + } + }; + return ( - - + - - - + + + + + + - - + + + + + {boxes[0].map((name) => ( + + {getBox(name)} + + ))} + + + {boxes[1].map((name) => ( + + {getBox(name)} + + ))} + + + - - - - - - - - - - - - - - - - - - -

No announcements.

-
-
- - - {quests?.length ? ( -

Available quests

- ) : ( -

Currently no available quests

- )} -
-
- - - -
-
-
-
+
+ {/* to be implemented */} + {/* + + + {quests?.length ? ( +

Available quests

+ ) : ( +

Currently no available quests

+ )} +
+ */}
); };