mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Add Discord URL to tournament page
This commit is contained in:
parent
f5a83b0032
commit
df950c6033
|
|
@ -2269,6 +2269,7 @@ export const PADDLING_POOL_257 = () =>
|
|||
isRanked: true,
|
||||
},
|
||||
showMapListGenerator: 0,
|
||||
discordUrl: null,
|
||||
castTwitchAccounts: ["dappleproductions"],
|
||||
castedMatchesInfo: {
|
||||
castedMatches: [
|
||||
|
|
@ -8083,6 +8084,7 @@ export const PADDLING_POOL_255 = () =>
|
|||
teamsPerGroup: 4,
|
||||
},
|
||||
showMapListGenerator: 0,
|
||||
discordUrl: null,
|
||||
castTwitchAccounts: ["dappleproductions"],
|
||||
castedMatchesInfo: {
|
||||
castedMatches: [
|
||||
|
|
@ -14224,6 +14226,7 @@ export const IN_THE_ZONE_32 = () =>
|
|||
],
|
||||
},
|
||||
showMapListGenerator: 0,
|
||||
discordUrl: null,
|
||||
castTwitchAccounts: ["dappleproductions", "kyochandxd"],
|
||||
castedMatchesInfo: null,
|
||||
mapPickingStyle: "AUTO_SZ",
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export const testTournament = (
|
|||
id: 1,
|
||||
description: null,
|
||||
rules: null,
|
||||
discordUrl: null,
|
||||
startTime: 1705858842,
|
||||
isFinalized: 0,
|
||||
name: "test",
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export async function findById(id: number) {
|
|||
.select(({ eb, exists, selectFrom }) => [
|
||||
"Tournament.id",
|
||||
"CalendarEvent.id as eventId",
|
||||
"CalendarEvent.discordUrl",
|
||||
"Tournament.settings",
|
||||
"Tournament.showMapListGenerator",
|
||||
"Tournament.castTwitchAccounts",
|
||||
|
|
|
|||
|
|
@ -78,6 +78,7 @@ import { NewTabs } from "~/components/NewTabs";
|
|||
import { useSearchParamState } from "~/hooks/useSearchParamState";
|
||||
import * as TeamRepository from "~/features/team/TeamRepository.server";
|
||||
import { Toggle } from "~/components/Toggle";
|
||||
import { DiscordIcon } from "~/components/icons/Discord";
|
||||
|
||||
export const action: ActionFunction = async ({ request, params }) => {
|
||||
const user = await requireUser(request);
|
||||
|
|
@ -385,6 +386,20 @@ function TournamentRegisterInfoTabs() {
|
|||
key: "description",
|
||||
element: (
|
||||
<div className="stack lg">
|
||||
{tournament.ctx.discordUrl ? (
|
||||
<div className="w-max">
|
||||
<LinkButton
|
||||
to={tournament.ctx.discordUrl}
|
||||
variant="outlined"
|
||||
size="tiny"
|
||||
isExternal
|
||||
icon={<DiscordIcon />}
|
||||
>
|
||||
Join the Discord
|
||||
</LinkButton>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div className="tournament__info__description">
|
||||
<Markdown options={{ wrapper: React.Fragment }}>
|
||||
{tournament.ctx.description ?? ""}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user