mirror of
https://github.com/MetaFam/TheGame.git
synced 2026-02-11 22:45:04 -05:00
standardizing the capitalization of URL ⛽
This commit is contained in:
@@ -18,18 +18,18 @@ import React from 'react';
|
||||
import { FaCheckCircle } from 'react-icons/fa';
|
||||
|
||||
export const GuildJoin: React.FC = () => {
|
||||
const discordOAuthCallbackUrl = `${CONFIG.publicUrl}/${Constants.DISCORD_OAUTH_CALLBACK_PATH}`;
|
||||
const discordOAuthCallbackURL = `${CONFIG.publicURL}/${Constants.DISCORD_OAUTH_CALLBACK_PATH}`;
|
||||
|
||||
const discordAuthParams = new URLSearchParams({
|
||||
response_type: 'code',
|
||||
client_id: Constants.DISCORD_BOT_CLIENT_ID,
|
||||
state: 'guid-to-go-in-localstorage',
|
||||
permissions: Constants.DISCORD_BOT_PERMISSIONS,
|
||||
redirect_uri: encodeURI(discordOAuthCallbackUrl),
|
||||
redirect_uri: encodeURI(discordOAuthCallbackURL),
|
||||
scope: Constants.DISCORD_OAUTH_SCOPES,
|
||||
});
|
||||
|
||||
const discordAuthUrl = `https://discord.com/api/oauth2/authorize?${discordAuthParams.toString()}`;
|
||||
const discordAuthURL = `https://discord.com/api/oauth2/authorize?${discordAuthParams.toString()}`;
|
||||
|
||||
return (
|
||||
<FlexContainer flex="1" justify="start" mt={5}>
|
||||
@@ -77,7 +77,7 @@ export const GuildJoin: React.FC = () => {
|
||||
asking for your permission to collect certain relevant information
|
||||
about your guild.
|
||||
</Text>
|
||||
<MetaButton size="lg" maxW="15rem" as="a" href={discordAuthUrl}>
|
||||
<MetaButton size="lg" maxW="15rem" as="a" href={discordAuthURL}>
|
||||
Apply to Join
|
||||
</MetaButton>
|
||||
</VStack>
|
||||
|
||||
@@ -14,11 +14,11 @@ export const CONFIG = {
|
||||
infuraId:
|
||||
process.env.NEXT_PUBLIC_INFURA_ID || '781d8466252d47508e177b8637b1c2fd',
|
||||
openseaApiKey: process.env.NEXT_OPENSEA_API_KEY || undefined,
|
||||
brightIdAppUrl:
|
||||
brightIdAppURL:
|
||||
process.env.NEXT_BRIGHTID_APP_URL || 'https://app.brightid.org',
|
||||
brightIdNodeUrl:
|
||||
brightIdNodeURL:
|
||||
process.env.NEXT_BRIGHTID_NODE_URL || 'http:%2f%2fnode.brightid.org',
|
||||
publicUrl: process.env.NEXT_PUBLIC_VERCEL_URL || 'http://localhost:3000',
|
||||
publicURL: process.env.NEXT_PUBLIC_VERCEL_URL || 'http://localhost:3000',
|
||||
gaId: process.env.NEXT_PUBLIC_GA4_ID || undefined,
|
||||
clarityId: process.env.NEXT_CLARITY_ID || undefined,
|
||||
};
|
||||
|
||||
@@ -34,8 +34,8 @@ export const PlayerFragment = gql`
|
||||
profile_cache {
|
||||
description
|
||||
emoji
|
||||
backgroundImageUrl
|
||||
imageUrl
|
||||
backgroundImageURL
|
||||
imageURL
|
||||
location
|
||||
name
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ import { PlayerFragmentFragment } from 'graphql/autogen/types';
|
||||
import { useEffect, useMemo } from 'react';
|
||||
|
||||
const BRIGHTID_CONTEXT = 'MetaGame';
|
||||
const DEEPLINK_ENDPOINT = `brightid://link-verification/${CONFIG.brightIdNodeUrl}/${BRIGHTID_CONTEXT}`;
|
||||
const UNIVERSAL_LINK_ENDPOINT = `${CONFIG.brightIdAppUrl}/link-verification/${CONFIG.brightIdNodeUrl}/${CONFIG.brightIdNodeUrl}/${BRIGHTID_CONTEXT}`;
|
||||
const VERIFICATION_ENDPOINT = `${CONFIG.brightIdAppUrl}/node/v5/verifications/${BRIGHTID_CONTEXT}`;
|
||||
const DEEPLINK_ENDPOINT = `brightid://link-verification/${CONFIG.brightIdNodeURL}/${BRIGHTID_CONTEXT}`;
|
||||
const UNIVERSAL_LINK_ENDPOINT = `${CONFIG.brightIdAppURL}/link-verification/${CONFIG.brightIdNodeURL}/${CONFIG.brightIdNodeURL}/${BRIGHTID_CONTEXT}`;
|
||||
const VERIFICATION_ENDPOINT = `${CONFIG.brightIdAppURL}/node/v5/verifications/${BRIGHTID_CONTEXT}`;
|
||||
const POLL_INTERVAL = 5000;
|
||||
|
||||
type BrightIdVerificationStatus =
|
||||
|
||||
@@ -6,7 +6,6 @@ import { PlayerFragmentFragment } from '../graphql/autogen/types';
|
||||
export const getPlayerImage = (player: PlayerFragmentFragment): string =>
|
||||
player.profile_cache?.imageURL ||
|
||||
`https://avatars.dicebear.com/api/jdenticon/${player.username}.svg`;
|
||||
|
||||
export const getPlayerCoverImage = (player: PlayerFragmentFragment): string =>
|
||||
player.profile_cache?.backgroundImageURL || BackgroundImage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user