mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-06 13:19:31 -05:00
Link to old user profiles on match page
This commit is contained in:
parent
2b0bdf9d92
commit
6d82d99b18
|
|
@ -1,5 +1,6 @@
|
|||
import type { LookingLoaderDataGroup } from "~/routes/play/looking";
|
||||
import { layoutIcon } from "~/utils";
|
||||
import { oldSendouInkUserProfile } from "~/utils/urls";
|
||||
import { Avatar } from "../Avatar";
|
||||
import { WeaponImage } from "../WeaponImage";
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ function Contents({ members }: { members: LookingLoaderDataGroup["members"] }) {
|
|||
return (
|
||||
<div key={member.id} className="play-looking__member-card">
|
||||
<a
|
||||
href={`https://sendou.ink/u/${member.discordId}`}
|
||||
href={oldSendouInkUserProfile({ discordId: member.discordId })}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="play-looking__member-link"
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ import {
|
|||
UserLean,
|
||||
validate,
|
||||
} from "~/utils";
|
||||
import { oldSendouInkUserProfile } from "~/utils/urls";
|
||||
|
||||
export const links: LinksFunction = () => {
|
||||
return [{ rel: "stylesheet", href: styles }];
|
||||
|
|
@ -263,12 +264,20 @@ export default function LFGMatchPage() {
|
|||
className="play-match__waves-section play-match__team-info"
|
||||
>
|
||||
{g.members.map((user) => (
|
||||
<div key={user.id} className="play-match__player">
|
||||
<Avatar user={user} />
|
||||
<span className="play-match__player-name">
|
||||
{user.discordName}
|
||||
</span>
|
||||
</div>
|
||||
<a
|
||||
href={oldSendouInkUserProfile({
|
||||
discordId: user.discordId,
|
||||
})}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div key={user.id} className="play-match__player">
|
||||
<Avatar user={user} />
|
||||
<span className="play-match__player-name">
|
||||
{user.discordName}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
))}
|
||||
{data.scores && (
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@
|
|||
flex-direction: column;
|
||||
align-items: center;
|
||||
font-size: var(--fonts-xs);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.play-match__score {
|
||||
|
|
|
|||
3
app/utils/urls.ts
Normal file
3
app/utils/urls.ts
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export function oldSendouInkUserProfile({ discordId }: { discordId: string }) {
|
||||
return `https://sendou.ink/u/${discordId}`;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user