mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-04-24 03:00:09 -04:00
feat: set default cover image for guild
This commit is contained in:
committed by
Scott Stevenson
parent
a74bf5f7e4
commit
8636865090
@@ -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}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user