Skip to content

Commit

Permalink
fix: import
Browse files Browse the repository at this point in the history
  • Loading branch information
h8570rg committed May 18, 2024
1 parent 7bd737b commit a69d17c
Show file tree
Hide file tree
Showing 65 changed files with 173 additions and 184 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
],
"pathGroups": [
{
"pattern": "~/**",
"pattern": "@/**",
"group": "internal"
},
{
Expand All @@ -49,7 +49,7 @@
"paths": [
{
"name": "dayjs",
"message": "Please import from '~/lib/utils/date' instead."
"message": "Please import from '@/lib/utils/date' instead."
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion app/(auth)/auth-code-error/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Link from "next/link";
import { Button } from "~/components/Button";
import { Button } from "@/components/Button";

/**
* @see https://supabase.com/docs/guides/auth/server-side/oauth-with-pkce-flow-for-ssr
Expand Down
4 changes: 2 additions & 2 deletions app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Image from "next/image";
import MahJong1Image from "~/assets/images/mahjong1.jpeg";
import Logo from "~/components/Logo";
import MahJong1Image from "@/assets/images/mahjong1.jpeg";
import Logo from "@/components/Logo";

export default function Auth({ children }: { children: React.ReactNode }) {
return (
Expand Down
4 changes: 2 additions & 2 deletions app/(auth)/login/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";

import { useFormState } from "react-dom";
import { Button } from "~/components/Button";
import { Input } from "~/components/Input";
import { Button } from "@/components/Button";
import { Input } from "@/components/Input";
import { signInEmail } from "./actions";

/**
Expand Down
4 changes: 2 additions & 2 deletions app/(auth)/login/SocialProviders.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use client";

import classNames from "classnames";
import { Button } from "~/components/Button";
import { GoogleIcon } from "~/components/SocialProviderIcon";
import { Button } from "@/components/Button";
import { GoogleIcon } from "@/components/SocialProviderIcon";
import { signInWithGoogle } from "./actions";

export function SocialProviders({ className }: { className?: string }) {
Expand Down
6 changes: 3 additions & 3 deletions app/(auth)/login/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { z } from "zod";
import { schema } from "~/lib/utils/schema";
import { createClient } from "~/lib/utils/supabase/server";
import { getURL } from "~/lib/utils/url";
import { schema } from "@/lib/utils/schema";
import { createClient } from "@/lib/utils/supabase/server";
import { getURL } from "@/lib/utils/url";

type State = {
errors?: {
Expand Down
2 changes: 1 addition & 1 deletion app/(auth)/login/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Metadata } from "next";
import Link from "next/link";
import { Divider } from "~/components/Divider";
import { Divider } from "@/components/Divider";
import { Form } from "./Form";
import { SocialProviders } from "./SocialProviders";

Expand Down
6 changes: 3 additions & 3 deletions app/(auth)/register/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import classNames from "classnames";
import { useFormState } from "react-dom";
import { Button } from "~/components/Button";
import { Input } from "~/components/Input";
import { Button } from "@/components/Button";
import { Input } from "@/components/Input";
import {
JANRECO_ID_MAX_LENGTH,
JANRECO_ID_MIN_LENGTH,
NAME_MAX_LENGTH,
} from "~/lib/config";
} from "@/lib/config";
import { updateProfile } from "./actions";

export function Form({
Expand Down
6 changes: 3 additions & 3 deletions app/(auth)/register/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { z } from "zod";
import { serverServices } from "~/lib/services/server";
import { schema } from "~/lib/utils/schema";
import { createClient } from "~/lib/utils/supabase/server";
import { serverServices } from "@/lib/services/server";
import { schema } from "@/lib/utils/schema";
import { createClient } from "@/lib/utils/supabase/server";

type State = {
errors?: {
Expand Down
4 changes: 2 additions & 2 deletions app/(auth)/register/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Metadata } from "next";
import { redirect } from "next/navigation";
import { Button } from "~/components/Button";
import { serverServices } from "~/lib/services/server";
import { Button } from "@/components/Button";
import { serverServices } from "@/lib/services/server";
import { Form } from "./Form";
import { signOut } from "./actions";

Expand Down
4 changes: 2 additions & 2 deletions app/(auth)/sign-up/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import classNames from "classnames";
import { useFormState } from "react-dom";
import { Button } from "~/components/Button";
import { Input } from "~/components/Input";
import { Button } from "@/components/Button";
import { Input } from "@/components/Input";
import { signUp } from "./actions";

/**
Expand Down
4 changes: 2 additions & 2 deletions app/(auth)/sign-up/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { z } from "zod";
import { schema } from "~/lib/utils/schema";
import { createClient } from "~/lib/utils/supabase/server";
import { schema } from "@/lib/utils/schema";
import { createClient } from "@/lib/utils/supabase/server";

type State = {
errors?: {
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/Navbar/Avatar/Menu.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useRouter } from "next/navigation";
import { DropdownMenu, DropdownItem } from "~/components/Dropdown";
import { DropdownMenu, DropdownItem } from "@/components/Dropdown";
import { signOut } from "../../actions";

export function NavbarAvatarDropdownMenu({
Expand Down
6 changes: 3 additions & 3 deletions app/(main)/Navbar/Avatar/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { redirect } from "next/navigation";
import { Avatar } from "~/components/Avatar";
import { Dropdown, DropdownTrigger } from "~/components/Dropdown";
import { serverServices } from "~/lib/services/server";
import { Avatar } from "@/components/Avatar";
import { Dropdown, DropdownTrigger } from "@/components/Dropdown";
import { serverServices } from "@/lib/services/server";
import { NavbarAvatarDropdownMenu } from "./Menu";

export async function NavbarAvatar() {
Expand Down
6 changes: 3 additions & 3 deletions app/(main)/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
NavbarContent,
} from "@nextui-org/react";
import { Suspense } from "react";
import { Link } from "~/components/Link";
import Logo from "~/components/Logo";
import { Skeleton } from "~/components/Skeleton";
import { Link } from "@/components/Link";
import Logo from "@/components/Logo";
import { Skeleton } from "@/components/Skeleton";
import { NavbarAvatar } from "./Avatar";

export default function Navbar() {
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { createClient } from "~/lib/utils/supabase/server";
import { createClient } from "@/lib/utils/supabase/server";

export async function signOut() {
const supabase = createClient();
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/friends/AddButton/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { serverServices } from "~/lib/services/server";
import { serverServices } from "@/lib/services/server";

export async function addFriends(profileId: string) {
const { addFriends } = serverServices();
Expand Down
14 changes: 7 additions & 7 deletions app/(main)/friends/AddButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
import { useState } from "react";
import useSWR from "swr";
import { useDebouncedCallback } from "use-debounce";
import { Button } from "~/components/Button";
import { Icon } from "~/components/Icon";
import { Input } from "~/components/Input";
import { Button } from "@/components/Button";
import { Icon } from "@/components/Icon";
import { Input } from "@/components/Input";
import {
Modal,
ModalBody,
ModalContent,
ModalHeader,
useDisclosure,
} from "~/components/Modal";
import { ScrollShadow } from "~/components/ScrollShadow";
import { User } from "~/components/User";
import { browserServices } from "~/lib/services/browser";
} from "@/components/Modal";
import { ScrollShadow } from "@/components/ScrollShadow";
import { User } from "@/components/User";
import { browserServices } from "@/lib/services/browser";
import { addFriends } from "./actions";

export function AddButton() {
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/friends/FriendMenu/actions.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use server";

import { revalidatePath } from "next/cache";
import { serverServices } from "~/lib/services/server";
import { serverServices } from "@/lib/services/server";

export async function deleteFriends(profileId: string) {
const { deleteFriends } = serverServices();
Expand Down
6 changes: 3 additions & 3 deletions app/(main)/friends/FriendMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"use client";

import { Button } from "~/components/Button";
import { Button } from "@/components/Button";
import {
Dropdown,
DropdownItem,
DropdownMenu,
DropdownTrigger,
} from "~/components/Dropdown";
import { Icon } from "~/components/Icon";
} from "@/components/Dropdown";
import { Icon } from "@/components/Icon";
import { deleteFriends } from "./actions";

export function FriendMenu({ profileId }: { profileId: string }) {
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/friends/loading.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { User } from "~/components/User";
import { User } from "@/components/User";

export default function Loading() {
return (
Expand Down
4 changes: 2 additions & 2 deletions app/(main)/friends/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { User } from "~/components/User";
import { serverServices } from "~/lib/services/server";
import { User } from "@/components/User";
import { serverServices } from "@/lib/services/server";
import { AddButton } from "./AddButton";
import { FriendMenu } from "./FriendMenu";

Expand Down
4 changes: 2 additions & 2 deletions app/(main)/matches/CreateMatchButton/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import { revalidatePath } from "next/cache";
import { redirect } from "next/navigation";
import { z } from "zod";
import { serverServices } from "~/lib/services/server";
import { schema } from "~/lib/utils/schema";
import { serverServices } from "@/lib/services/server";
import { schema } from "@/lib/utils/schema";

type State = {
errors?: {
Expand Down
16 changes: 8 additions & 8 deletions app/(main)/matches/CreateMatchButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
import classNames from "classnames";
import { useFormState } from "react-dom";
import { Controller, useForm } from "react-hook-form";
import { Accordion, AccordionItem } from "~/components/Accordion";
import { Button, ButtonGroup } from "~/components/Button";
import { Input } from "~/components/Input";
import { useDisclosure } from "~/components/Modal";
import { Accordion, AccordionItem } from "@/components/Accordion";
import { Button, ButtonGroup } from "@/components/Button";
import { Input } from "@/components/Input";
import { useDisclosure } from "@/components/Modal";
import {
Modal,
ModalBody,
ModalContent,
ModalFooter,
ModalHeader,
} from "~/components/Modal";
import { Select, SelectItem } from "~/components/Select";
import { Slider } from "~/components/Slider";
} from "@/components/Modal";
import { Select, SelectItem } from "@/components/Select";
import { Slider } from "@/components/Slider";
import {
calcMethods,
chipRateLabel,
Expand All @@ -24,7 +24,7 @@ import {
inclineFor4PlayersLabel,
rateLabel,
rates,
} from "~/lib/config";
} from "@/lib/config";
import { createMatch, InputSchema } from "./actions";

const playersCount4DefaultValues: InputSchema = {
Expand Down
2 changes: 1 addition & 1 deletion app/(main)/matches/MatchCard/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { useRouter } from "next/navigation";
import { Card } from "~/components/Card";
import { Card } from "@/components/Card";

export function NavigationCard({
matchId,
Expand Down
10 changes: 5 additions & 5 deletions app/(main)/matches/MatchCard/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Avatar, AvatarGroup } from "~/components/Avatar";
import { CardBody, CardHeader } from "~/components/Card";
import { Divider } from "~/components/Divider";
import { serverServices } from "~/lib/services/server";
import { dayjs } from "~/lib/utils/date";
import { Avatar, AvatarGroup } from "@/components/Avatar";
import { CardBody, CardHeader } from "@/components/Card";
import { Divider } from "@/components/Divider";
import { serverServices } from "@/lib/services/server";
import { dayjs } from "@/lib/utils/date";
import { NavigationCard } from "./Card";

export async function MatchCard({
Expand Down
8 changes: 4 additions & 4 deletions app/(main)/matches/[matchId]/ChipInputModal/ChipForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
import { useEffect } from "react";
import { useFormState } from "react-dom";
import { Controller, useFieldArray, useForm } from "react-hook-form";
import { Button } from "~/components/Button";
import { Input } from "~/components/Input";
import { ModalBody, ModalFooter } from "~/components/Modal";
import { Match } from "~/lib/type";
import { Button } from "@/components/Button";
import { Input } from "@/components/Input";
import { ModalBody, ModalFooter } from "@/components/Modal";
import { Match } from "@/lib/type";
import { useChipInputModal } from "../useChipInputModal";
import { addChip } from "./actions";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Modal, ModalContent } from "~/components/Modal";
import { Modal, ModalContent } from "@/components/Modal";
import { useChipInputModal } from "../useChipInputModal";

export function ModalController({ children }: { children: React.ReactNode }) {
Expand Down
4 changes: 2 additions & 2 deletions app/(main)/matches/[matchId]/ChipInputModal/actions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use server";

import { z } from "zod";
import { serverServices } from "~/lib/services/server";
import { schema } from "~/lib/utils/schema";
import { serverServices } from "@/lib/services/server";
import { schema } from "@/lib/utils/schema";

type AddChipState = {
success?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions app/(main)/matches/[matchId]/ChipInputModal/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ModalHeader } from "~/components/Modal";
import { serverServices } from "~/lib/services/server";
import { ModalHeader } from "@/components/Modal";
import { serverServices } from "@/lib/services/server";
import { ChipForm } from "./ChipForm";
import { ModalController } from "./ModalController";

Expand Down
12 changes: 6 additions & 6 deletions app/(main)/matches/[matchId]/GameInputModal/GameForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import classNames from "classnames";
import { ComponentProps, useCallback, useEffect } from "react";
import { useFormState } from "react-dom";
import { Controller, useFieldArray, useForm } from "react-hook-form";
import { Button } from "~/components/Button";
import { Icon } from "~/components/Icon";
import { Input } from "~/components/Input";
import { ModalBody, ModalFooter } from "~/components/Modal";
import { Select, SelectItem } from "~/components/Select";
import { Match } from "~/lib/type";
import { Button } from "@/components/Button";
import { Icon } from "@/components/Icon";
import { Input } from "@/components/Input";
import { ModalBody, ModalFooter } from "@/components/Modal";
import { Select, SelectItem } from "@/components/Select";
import { Match } from "@/lib/type";
import { useGameInputModal } from "../useGameInputModal";
import { addGame } from "./actions";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { Modal, ModalContent } from "~/components/Modal";
import { Modal, ModalContent } from "@/components/Modal";
import { useGameInputModal } from "../useGameInputModal";

export function ModalController({ children }: { children: React.ReactNode }) {
Expand Down
Loading

0 comments on commit a69d17c

Please sign in to comment.