feat: set default cover image for guild

This commit is contained in:
vidvidvid
2021-12-05 18:58:30 +01:00
committed by Scott Stevenson
parent a74bf5f7e4
commit 8636865090
2 changed files with 4 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ 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 { getGuildCoverImageFull } from 'utils/playerHelpers';
import { PageContainer } from '../../components/Container';
import { GuildHero } from '../../components/Guild/GuildHero';
@@ -64,7 +64,7 @@ const GuildPage: React.FC<Props> = ({ guild }) => {
return (
<PageContainer p={0}>
<Box
background={`url(${getPlayerCoverImageFull({})}) no-repeat`}
background={`url(${getGuildCoverImageFull()}) no-repeat`}
bgSize="cover"
bgPos="center"
h={72}

View File

@@ -15,6 +15,8 @@ export const getPlayerCoverImageFull = (
player: PlayerFragmentFragment,
): string => player.profile_cache?.backgroundImageURL || BackgroundImageFull;
export const getGuildCoverImageFull = (): string => BackgroundImageFull;
export const getPlayerName = (player: PlayerFragmentFragment): string =>
player.profile_cache?.name || formatUsernameIfAddress(player.username);