Skip to content

Commit

Permalink
update link (#2465)
Browse files Browse the repository at this point in the history
  • Loading branch information
aymericdelab authored Dec 12, 2024
1 parent 09b444e commit b84417e
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions client/.env.preview
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ VITE_LORDS_ADDRESS=0x0342ad5cc14002c005a5cedcfce2bd3af98d5e7fb79e9bf949b3a91cf14
VITE_PUBLIC_CHAIN=sepolia
VITE_PUBLIC_SLOT=sepolia-rc-17

VITE_SOCIAL_LINK=http://bit.ly/3Zz1mpp

VITE_PUBLIC_CONSTRUCTION_FLAG=false
VITE_PUBLIC_HIDE_THREEJS_MENU=false

Expand Down
2 changes: 2 additions & 0 deletions client/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ VITE_SEASON_PASS_ADDRESS=0x057675b9c0bd62b096a2e15502a37b290fa766ead21c33eda4299
VITE_REALMS_ADDRESS=0x07ae27a31bb6526e3de9cf02f081f6ce0615ac12a6d7b85ee58b8ad7947a2809
VITE_LORDS_ADDRESS=0x0124aeb495b947201f5fac96fd1138e326ad86195b98df6dec9009158a533b49

VITE_SOCIAL_LINK=http://bit.ly/3Zz1mpp

VITE_PUBLIC_CHAIN=mainnet
VITE_PUBLIC_SLOT=eternum-mainnet

Expand Down
3 changes: 3 additions & 0 deletions client/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ const envSchema = z.object({
VITE_PUBLIC_IPFS_GATEWAY: z.string().url(),

VITE_PUBLIC_SLOT: z.string(),

// Social
VITE_SOCIAL_LINK: z.string().url(),
});

let env: z.infer<typeof envSchema>;
Expand Down
3 changes: 2 additions & 1 deletion client/src/ui/components/military/PillageHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { divideByPrecision, formatNumber, formatResources, formatTime } from "@/
import { BattleSide, ID, Resource, resources } from "@bibliothecadao/eternum";
import { ComponentValue, defineQuery, getComponentValue, HasValue, isComponentUpdate } from "@dojoengine/recs";
import { useEffect, useMemo, useState } from "react";
import { env } from "../../../../env";
import { TroopDisplay } from "./TroopChip";

type PillageEvent = ComponentValue<ClientComponents["events"]["BattlePillageData"]["schema"]>;
Expand Down Expand Up @@ -42,7 +43,7 @@ const PillageHistoryItem = ({ addressName, history }: { addressName: string; his
)?.trait}`,
)
.join(", "),
url: window.location.origin,
url: env.VITE_SOCIAL_LINK,
});
}
}, [isSuccess, addressName]);
Expand Down
3 changes: 2 additions & 1 deletion client/src/ui/components/worldmap/guilds/GuildMembers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import TwitterShareButton from "@/ui/elements/TwitterShareButton";
import { formatSocialText, twitterTemplates } from "@/ui/socials";
import { ContractAddress, ID, Player } from "@bibliothecadao/eternum";
import { useCallback, useState } from "react";
import { env } from "../../../../../env";
import { useDojo } from "../../../../hooks/context/DojoContext";
import { GuildInviteList } from "./GuildInvitesList";
import { GuildMemberList } from "./GuildMemberList";
Expand Down Expand Up @@ -91,7 +92,7 @@ export const GuildMembers = ({ players, selectedGuildEntityId, viewPlayerInfo, s
? formatSocialText(userGuild?.isOwner ? twitterTemplates.createdTribe : twitterTemplates.joinedTribe, {
tribeName: selectedGuild?.name,
addressName: playerName,
url: window.location.origin,
url: env.VITE_SOCIAL_LINK,
})
: undefined;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { currencyFormat } from "@/ui/utils/utils";
import { BattleSide } from "@bibliothecadao/eternum";
import { ComponentValue } from "@dojoengine/recs";
import { useMemo } from "react";
import { env } from "../../../../../env";

export const BattleTwitterShareButton = ({
userArmiesInBattle,
Expand Down Expand Up @@ -82,7 +83,7 @@ export const BattleTwitterShareButton = ({
enemyName,
attackerTroops: currencyFormat(totalAttackerTroops, 0),
defenderTroops: currencyFormat(totalDefenderTroops, 0),
url: window.location.origin,
url: env.VITE_SOCIAL_LINK,
});
};

Expand Down

0 comments on commit b84417e

Please sign in to comment.