mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-25 15:56:19 -05:00
Switch common hooks from /utils to /hooks
This commit is contained in:
parent
c8377f5a98
commit
d530e9383c
|
|
@ -1,7 +1,7 @@
|
|||
import { useCatch, useLocation } from "remix";
|
||||
import { DISCORD_URL } from "~/constants";
|
||||
import { getLogInUrl } from "~/utils";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import { Button } from "./Button";
|
||||
|
||||
// TODO: some nice art
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useLocation } from "remix";
|
||||
import { getLogInUrl } from "~/utils";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import { DiscordIcon } from "../icons/Discord";
|
||||
|
||||
export function UserItem() {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { useEffect } from "react";
|
||||
import { useActionData, useTransition } from "remix";
|
||||
import { useTimeoutState } from "~/utils/hooks";
|
||||
import { useTimeoutState } from "~/hooks/common";
|
||||
import { Button, ButtonProps } from "./Button";
|
||||
|
||||
export function SubmitButton(
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import invariant from "tiny-invariant";
|
|||
import { matchIsOver } from "~/core/tournament/utils";
|
||||
import type { BracketModified } from "~/services/bracket";
|
||||
import type { FindTournamentByNameForUrlI } from "~/services/tournament";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import { ActionSectionWrapper } from "./ActionSectionWrapper";
|
||||
import { DuringMatchActions } from "./DuringMatchActions";
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import {
|
|||
} from "~/constants";
|
||||
import { TournamentAction } from "~/routes/to/$organization.$tournament";
|
||||
import type { FindTournamentByNameForUrlI } from "~/services/tournament";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import { Button } from "../Button";
|
||||
import { AlertIcon } from "../icons/Alert";
|
||||
import { CheckInIcon } from "../icons/CheckIn";
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import { resolveTournamentFormatString } from "~/core/tournament/bracket";
|
|||
import { tournamentHasStarted } from "~/core/tournament/utils";
|
||||
import { FindTournamentByNameForUrlI } from "~/services/tournament";
|
||||
import { getLogInUrl } from "~/utils";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
|
||||
export function InfoBanner() {
|
||||
const data = useLoaderData<FindTournamentByNameForUrlI>();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Form, useTransition } from "remix";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import { Button } from "../Button";
|
||||
|
||||
export function TeamRoster({
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { useLoaderData } from "remix";
|
|||
import type { BracketData } from "server/events";
|
||||
import type { BracketModified } from "~/services/bracket";
|
||||
import { Unpacked } from "~/utils";
|
||||
import { useEvents } from "~/utils/hooks";
|
||||
import { useEvents } from "~/hooks/common";
|
||||
|
||||
export function useBracketDataWithEvents(): BracketModified {
|
||||
const data = useLoaderData<BracketModified>();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import {
|
|||
} from "~/services/tournament";
|
||||
import { makeTitle, requireUser } from "~/utils";
|
||||
import type { MyCSSProperties } from "~/utils";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import tournamentStylesUrl from "../../styles/tournament.css";
|
||||
import * as React from "react";
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import {
|
|||
requireUser,
|
||||
safeJSONParse,
|
||||
} from "~/utils";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
|
||||
export const links: LinksFunction = () => {
|
||||
return [{ rel: "stylesheet", href: styles }];
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import {
|
|||
import { getTrustingUsers } from "~/services/user";
|
||||
import styles from "~/styles/tournament-manage-roster.css";
|
||||
import { parseRequestFormData, requireUser } from "~/utils";
|
||||
import { useBaseURL, useTimeoutState } from "~/utils/hooks";
|
||||
import { useBaseURL, useTimeoutState } from "~/hooks/common";
|
||||
|
||||
export const links: LinksFunction = () => {
|
||||
return [{ rel: "stylesheet", href: styles }];
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import {
|
|||
FindTournamentByNameForUrlI,
|
||||
} from "~/services/tournament";
|
||||
import styles from "~/styles/tournament-register.css";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
import { requireUser } from "~/utils";
|
||||
import { Catcher } from "~/components/Catcher";
|
||||
import {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ import {
|
|||
safeJSONParse,
|
||||
Unpacked,
|
||||
} from "~/utils";
|
||||
import { useTimeoutState } from "~/utils/hooks";
|
||||
import { useTimeoutState } from "~/hooks/common";
|
||||
|
||||
const seedsActionSchema = z.object({
|
||||
tournamentId: z.string().uuid(),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { useMatches } from "remix";
|
||||
import type { FindTournamentByNameForUrlI } from "~/services/tournament";
|
||||
import { TeamRoster } from "~/components/tournament/TeamRoster";
|
||||
import { useUser } from "~/utils/hooks";
|
||||
import { useUser } from "~/hooks/common";
|
||||
|
||||
export default function TeamsTab() {
|
||||
const [, parentRoute] = useMatches();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user