Fix errors

This commit is contained in:
Kalle
2026-03-15 16:13:38 +02:00
parent 07f9e28234
commit fcf0735d75
4 changed files with 10 additions and 42 deletions

View File

@@ -4,10 +4,7 @@ import { db } from "~/db/sql";
import type { DB, Tables } from "~/db/tables";
import { shortNanoid } from "~/utils/id";
import invariant from "~/utils/invariant";
import {
concatUserSubmittedImagePrefix,
userChatNameColorForJson,
} from "~/utils/kysely.server";
import { concatUserSubmittedImagePrefix } from "~/utils/kysely.server";
import { errorIsSqliteForeignKeyConstraintFailure } from "~/utils/sql";
import { randomTeamName } from "~/utils/team-name";
@@ -114,7 +111,6 @@ export async function findLookingTeamsByTournamentId(tournamentId: number) {
role: eb.ref("TournamentTeamMember.role"),
isStayAsSub: eb.ref("TournamentTeamMember.isStayAsSub"),
weapons: eb.ref("User.qWeaponPool"),
chatNameColor: userChatNameColorForJson,
plusTier: eb.ref("PlusTier.tier"),
}),
])
@@ -155,7 +151,6 @@ export async function findSubGroups(tournamentId: number) {
role: eb.ref("TournamentTeamMember.role"),
isStayAsSub: eb.ref("TournamentTeamMember.isStayAsSub"),
weapons: eb.ref("User.qWeaponPool"),
chatNameColor: userChatNameColorForJson,
plusTier: eb.ref("PlusTier.tier"),
}),
])

View File

@@ -30,10 +30,6 @@
color: var(--text);
}
.avatar {
min-width: 36px;
}
.extraInfo {
font-size: var(--fonts-xs);
background-color: var(--bg-darker);
@@ -47,21 +43,6 @@
min-height: 24px;
}
.extraInfoButton {
font-size: var(--fonts-xs);
background-color: var(--bg-darker);
border-radius: var(--rounded);
padding: var(--s-0-5) var(--s-1-5);
width: max-content;
display: flex;
align-items: center;
gap: var(--s-1);
font-weight: var(--semi-bold);
color: var(--text);
border: none;
min-height: 24px;
}
.vcIcon {
height: 15px;
stroke-width: 2;

View File

@@ -1,4 +1,5 @@
import clsx from "clsx";
import { Mic, Star, Volume2, VolumeX } from "lucide-react";
import * as React from "react";
import { useTranslation } from "react-i18next";
import { Link, useFetcher } from "react-router";
@@ -7,11 +8,6 @@ import { Divider } from "~/components/Divider";
import { SendouButton } from "~/components/elements/Button";
import { SendouPopover } from "~/components/elements/Popover";
import { Image, WeaponImage } from "~/components/Image";
import { MicrophoneIcon } from "~/components/icons/Microphone";
import { SpeakerIcon } from "~/components/icons/Speaker";
import { SpeakerXIcon } from "~/components/icons/SpeakerX";
import { StarIcon } from "~/components/icons/Star";
import { StarFilledIcon } from "~/components/icons/StarFilled";
import { SubmitButton } from "~/components/SubmitButton";
import type { Pronouns } from "~/db/tables";
import { useUser } from "~/features/auth/core/user";
@@ -280,7 +276,7 @@ function LFGMemberRoleManager({
}) {
const fetcher = useFetcher();
const { t } = useTranslation(["q"]);
const Icon = member.role === "OWNER" ? StarFilledIcon : StarIcon;
const isFilled = member.role === "OWNER";
if (!showActions && member.role !== "OWNER") return null;
@@ -290,10 +286,11 @@ function LFGMemberRoleManager({
<SendouButton
variant="minimal"
icon={
<Icon
<Star
className={clsx(styles.star, {
[styles.starInactive]: member.role === "REGULAR",
})}
fill={isFilled ? "currentColor" : "none"}
/>
}
/>
@@ -342,11 +339,7 @@ function LFGVoiceChatInfo({
if (!member.languages || !member.vc) return null;
const Icon =
member.vc === "YES"
? MicrophoneIcon
: member.vc === "LISTEN_ONLY"
? SpeakerIcon
: SpeakerXIcon;
member.vc === "YES" ? Mic : member.vc === "LISTEN_ONLY" ? Volume2 : VolumeX;
const color = () => {
const languagesMatch =

View File

@@ -1,4 +1,5 @@
import clsx from "clsx";
import { Mic, Trash } from "lucide-react";
import * as React from "react";
import { Flipper } from "react-flip-toolkit";
import { useTranslation } from "react-i18next";
@@ -14,8 +15,6 @@ import {
} from "~/components/elements/Tabs";
import { FormWithConfirm } from "~/components/FormWithConfirm";
import { WeaponImage } from "~/components/Image";
import { MicrophoneIcon } from "~/components/icons/Microphone";
import { TrashIcon } from "~/components/icons/Trash";
import { Placeholder } from "~/components/Placeholder";
import { SubmitButton } from "~/components/SubmitButton";
import { useUser } from "~/features/auth/core/user";
@@ -157,7 +156,7 @@ function GroupsView({
) : null}
<div className={styles.innerContainer}>
<SendouTabs>
<SendouTabList scrolling={isMobile}>
<SendouTabList>
<SendouTab id="groups" number={neutralGroups.length}>
{t("q:looking.columns.groups")}
</SendouTab>
@@ -287,7 +286,7 @@ function SubCard({ sub }: { sub: SubEntry }) {
const infos = [
<div key="vc" className={styles.subsInfoVc}>
<MicrophoneIcon
<Mic
className={
sub.vc === "YES"
? "text-success"
@@ -375,7 +374,7 @@ function SubCard({ sub }: { sub: SubEntry }) {
variant="minimal-destructive"
size="small"
type="submit"
icon={<TrashIcon />}
icon={<Trash />}
>
{t("common:actions.delete")}
</SendouButton>