Skip to content

Commit

Permalink
Merge pull request #332 from h8570rg/refactor/directory
Browse files Browse the repository at this point in the history
refactor: directory
  • Loading branch information
h8570rg authored Jan 30, 2025
2 parents 56b5381 + d526b6c commit e7bc480
Show file tree
Hide file tree
Showing 84 changed files with 49 additions and 49 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Metadata } from "next";
import Link from "next/link";
import { Divider } from "@/components/Divider";
import { LoginForm } from "./(components)/LoginForm";
import { SocialProviders } from "./(components)/SocialProviders";
import { LoginForm } from "./_components/LoginForm";
import { SocialProviders } from "./_components/SocialProviders";

export const metadata: Metadata = {
title: "ログイン",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Metadata } from "next";
import { redirect } from "next/navigation";
import { Button } from "@/components/Button";
import { serverServices } from "@/lib/services/server";
import { RegisterForm } from "./(components)/RegisterForm";
import { signOut } from "./(components)/RegisterForm/actions";
import { RegisterForm } from "./_components/RegisterForm";
import { signOut } from "./_components/RegisterForm/actions";

export const metadata: Metadata = {
title: "ユーザー情報登録",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Metadata } from "next";
import Link from "next/link";
import { SignUpForm } from "./(components)/SignUpForm";
import { SignUpForm } from "./_components/SignUpForm";

export const metadata: Metadata = {
title: "新規登録",
Expand Down
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Accordion, AccordionItem } from "@/components/Accordion";

export function FAQ({
export function Faq({
faqs,
}: {
faqs: { question: string; answer: string }[];
Expand Down
6 changes: 3 additions & 3 deletions app/(lp)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { Button } from "@/components/Button";
import { Card, CardBody } from "@/components/Card";
import Logo from "@/components/Logo";
import { SERVICE_NAME } from "@/lib/config";
import match from "./(assets)/match.png";
import { FAQ } from "./(components)/FAQ";
import match from "./_assets/match.png";
import { Faq } from "./_components/Faq";

const features = [
{
Expand Down Expand Up @@ -156,7 +156,7 @@ export default function LandingPage() {
<section className="">
<div className="container mx-auto">
<h2 className="mb-12 text-center text-large">よくある質問</h2>
<FAQ faqs={faqs} />
<Faq faqs={faqs} />
</div>
</section>
</div>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { User } from "@/components/User";
import { serverServices } from "@/lib/services/server";
import { AddButton } from "./(components)/AddButton";
import { FriendMenu } from "./(components)/FriendMenu";
import { AddButton } from "./_components/AddButton";
import { FriendMenu } from "./_components/FriendMenu";

export default async function FriendsPage() {
const { getFriends } = await serverServices();
Expand Down
4 changes: 2 additions & 2 deletions app/(main)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Appbar from "./(components)/Appbar";
import { ReleaseNotes } from "./(components)/ReleaseNotes";
import Appbar from "./_components/Appbar";
import { ReleaseNotes } from "./_components/ReleaseNotes";

export default function AppLayout({ children }: { children: React.ReactNode }) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Button } from "@/components/Button";
import { Input } from "@/components/Input";
import { ModalBody, ModalFooter } from "@/components/Modal";
import { Match } from "@/lib/type";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";
import { addChip } from "./actions";

type Schema = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Modal, ModalContent } from "@/components/Modal";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export function ChipModalController({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { forwardRef } from "react";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export const ChipModalTrigger = forwardRef<
HTMLButtonElement,
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/matches/[matchId]/_components/ChipModal/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { ChipModalRoot as ChipModal } from "./Root";
export { ChipModalTrigger } from "./Trigger";
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Modal, ModalContent } from "@/components/Modal";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export function DataModalController({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { forwardRef } from "react";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export const DataModalTrigger = forwardRef<
HTMLButtonElement,
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/matches/[matchId]/_components/DataModal/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { DataModalRoot as DataModal } from "./Root";
export { DataModalTrigger } from "./Trigger";
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Input } from "@/components/Input";
import { ModalBody, ModalFooter } from "@/components/Modal";
import { Select, SelectItem } from "@/components/Select";
import { Match } from "@/lib/type";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";
import { addGame } from "./actions";

type Schema = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Modal, ModalContent } from "@/components/Modal";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export function GameModalController({
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { forwardRef } from "react";
import { Button, ButtonProps } from "@/components/Button";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export const GameModalTrigger = forwardRef<
HTMLButtonElement,
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/matches/[matchId]/_components/GameModal/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { GameModalRoot as GameModal } from "./Root";
export { GameModalTrigger } from "./Trigger";
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { Button } from "@/components/Button";
import { Icon } from "@/components/Icon";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export function AddGameButton({ isPlayersShort }: { isPlayersShort: boolean }) {
const { gameModal } = useMatchContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
import {
GameDeleteConfirmDialog,
useGameDeleteConfirmDialog,
} from "./(components)/GameDeleteConfirmDialog";
} from "./GameDeleteConfirmDialog";

export function GameUpdateModal({
matchId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { MatchPlayer } from "@/lib/type";
import { ChipModalTrigger } from "../ChipModal";
import { GameModalTrigger } from "../GameModal";
import { PlayersModalTrigger } from "../PlayersModal";
import { GameRow } from "./(components)/GameRow";
import { GameRow } from "./GameRow";

type Column = {
id: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { ScrollShadow } from "@/components/ScrollShadow";
import { User } from "@/components/User";
import { Profile } from "@/lib/type";
import { ProfileCreateModal } from "./(components)/ProfileCreateModal";
import { ProfileCreateModal } from "./ProfileCreateModal";
import { searchProfiles, updateMatchPlayers } from "./actions";

export function PlayersModalContent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useEffect } from "react";
import { Modal } from "@/components/Modal";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export function PlayersModalController({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { forwardRef } from "react";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export const PlayersModalTrigger = forwardRef<
HTMLButtonElement,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { PlayersModalRoot as PlayersModal } from "./Root";
export { PlayersModalTrigger } from "./Trigger";
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { Modal } from "@/components/Modal";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export function RuleModalController({
children,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { forwardRef } from "react";
import { useMatchContext } from "../../../../context";
import { useMatchContext } from "../../../context";

export const RuleModalTrigger = forwardRef<
HTMLButtonElement,
Expand Down
2 changes: 2 additions & 0 deletions app/(main)/matches/[matchId]/_components/RuleModal/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { RuleModalRoot as RuleModal } from "./Root";
export { RuleModalTrigger } from "./Trigger";
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import Link from "next/link";
import { Suspense } from "react";
import { Button } from "@/components/Button";
import { Icon } from "@/components/Icon";
import { ChipModal, ChipModalTrigger } from "./(components)/ChipModal";
import { MatchContextProvider } from "./(components)/ContextProvider";
import { DataModal, DataModalTrigger } from "./(components)/DataModal";
import { GameModal } from "./(components)/GameModal";
import { MatchTable } from "./(components)/MatchTable";
import { PlayersModal, PlayersModalTrigger } from "./(components)/PlayersModal";
import { RuleModal, RuleModalTrigger } from "./(components)/RuleModal";
import { ChipModal, ChipModalTrigger } from "./_components/ChipModal";
import { MatchContextProvider } from "./_components/ContextProvider";
import { DataModal, DataModalTrigger } from "./_components/DataModal";
import { GameModal } from "./_components/GameModal";
import { MatchTable } from "./_components/MatchTable";
import { PlayersModal, PlayersModalTrigger } from "./_components/PlayersModal";
import { RuleModal, RuleModalTrigger } from "./_components/RuleModal";

export default async function Match({
params,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CardBody, CardHeader } from "@/components/Card";
import { Divider } from "@/components/Divider";
import { Match } from "@/lib/type";
import { dayjs } from "@/lib/utils/date";
import { NavigationCard } from "./(components)/Card";
import { NavigationCard } from "./Card";

export function MatchCard({ match, userId }: { match: Match; userId: string }) {
const { createdAt } = match;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { serverServices } from "@/lib/services/server";
import { CreateMatchButton } from "./(components)/CreateMatchButton";
import { MatchCard } from "./(components)/MatchCard";
import { CreateMatchButton } from "./_components/CreateMatchButton";
import { MatchCard } from "./_components/MatchCard";

export default async function Matches() {
const { getMatches, getUser } = await serverServices();
Expand Down
File renamed without changes.
Binary file added app/.DS_Store
Binary file not shown.

0 comments on commit e7bc480

Please sign in to comment.