Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/hikahana/323-fix-import-types-graphql #324

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactNode } from "react";
import React from "react";
import styles from "./BingoResult.module.css";
Copy link
Collaborator

@TkymHrt TkymHrt Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要です!他のファイルもついでに!o(^o^)o

Suggested change
import React from "react";

import { SubscribeListNumbersSubscription } from "@/type/graphql";

Expand Down
12 changes: 6 additions & 6 deletions view-admin/src/components/common/PrizeResult/PrizeResult.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React, { useState } from "react";
import styles from "./PrizeResult.module.css";
import { useMutation } from "@apollo/client";
import { UpdateOnePrizeIsWonDocument } from "@/type/graphql";
import Image from "next/image";
import type {
UpdateOnePrizeIsWonMutation,
UpdateOnePrizeIsWonMutationVariables,
GetListPrizesQuery,
import {
UpdateOnePrizeIsWonDocument,
type UpdateOnePrizeIsWonMutation,
type UpdateOnePrizeIsWonMutationVariables,
type GetListPrizesQuery,
} from "@/type/graphql";
import Image from "next/image";

interface PrizeResultProps {
prizeResult: GetListPrizesQuery["prizes"];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import React, { useState } from "react";
import styles from "./UpdateNumberModal.module.css";
import { RxCrossCircled } from "react-icons/rx";
import { useMutation } from "@apollo/client";
import { UpdateOneNumberDocument } from "@/type/graphql";
import type {
UpdateOneNumberMutation,
UpdateOneNumberMutationVariables,
import {
UpdateOneNumberDocument,
type UpdateOneNumberMutation,
type UpdateOneNumberMutationVariables,
} from "@/type/graphql";

interface UpdateNumberModalProps {
Expand Down
16 changes: 7 additions & 9 deletions view-admin/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,9 @@ import {
SubscribeListNumbersDocument,
IncrementReachNumDocument,
DecrementReachNumDocument,
} from "@/type/graphql";
import type {
SubscribeListNumbersSubscription,
IncrementReachNumMutation,
DecrementReachNumMutation,
type SubscribeListNumbersSubscription,
type IncrementReachNumMutation,
type DecrementReachNumMutation,
} from "@/type/graphql";

interface formDataCreate {
Expand All @@ -43,7 +41,7 @@ const Page: NextPage = () => {
SubscribeListNumbersSubscription["numbers"]
>([]);
const [isOpened, setIsOpened] = useState<boolean>(false);
const isopenBool = () => setIsOpened(!isOpened);
const isOpenBool = () => setIsOpened(!isOpened);
const [isOpenUpdateNumberModal, setIsOpenUpdateNumberModal] =
useState<boolean>(false);

Expand Down Expand Up @@ -143,7 +141,7 @@ const Page: NextPage = () => {
>
<p>景品管理</p>
</Button>
<Button size="m" shape="circle" onClick={isopenBool}>
<Button size="m" shape="circle" onClick={isOpenBool}>
<p>ビンゴ正誤判定</p>
</Button>
<Button
Expand All @@ -161,7 +159,7 @@ const Page: NextPage = () => {
<p>抽選した番号を入力</p>
<form onSubmit={handleSubmitCreate(onSubmitCreate)}>
<div className={styles.item}>
<div className={styles.flexerror}>
<div className={styles.flexError}>
<input
type="number"
placeholder="番号を入力"
Expand Down Expand Up @@ -195,7 +193,7 @@ const Page: NextPage = () => {
<div className={styles.frame}>
<p className={styles.centerText}>抽選した番号を削除</p>
<div className={styles.item}>
<div className={styles.flexerror}>
<div className={styles.flexError}>
<input
type="number"
placeholder="番号を入力"
Expand Down
13 changes: 5 additions & 8 deletions view-admin/src/pages/postPrizes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ import {
GetListPrizesDocument,
CreateOnePrizeDocument,
CreateOneImageDocument,
type GetListPrizesQuery,
type CreateOneImageMutation,
type CreateOnePrizeMutation,
type CreateOneImageMutationVariables,
type CreateOnePrizeMutationVariables,
} from "@/type/graphql";
import type {
GetListPrizesQuery,
CreateOneImageMutation,
CreateOnePrizeMutation,
CreateOneImageMutationVariables,
CreateOnePrizeMutationVariables,
} from "@/type/graphql";

import { useRouter } from "next/router";

const Page: NextPage = () => {
Expand Down
3 changes: 1 addition & 2 deletions view-admin/src/pages/prizes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { Header, Button, PrizeResult } from "@/components/common";
import { useRouter } from "next/router";
import { useState, useEffect, useRef } from "react";
import { useQuery } from "@apollo/client";
import { GetListPrizesDocument } from "@/type/graphql";
import type { GetListPrizesQuery } from "@/type/graphql";
import { GetListPrizesDocument, type GetListPrizesQuery } from "@/type/graphql";

const Page: NextPage = () => {
const router = useRouter();
Expand Down
2 changes: 1 addition & 1 deletion view-admin/src/styles/Home.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
font-size: small;
}

.flexerror {
.flexError {
display: flex;
flex-direction: column;
}
Expand Down
12 changes: 6 additions & 6 deletions view-admin/src/type/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2116,11 +2116,11 @@ export type GetOneLatestReachLogQuery = {
reachLogs: Array<{ __typename?: "ReachLogs"; reachNum: number }>;
};

export type SubscribeOneLatestReachlogSubscriptionVariables = Exact<{
export type SubscribeOneLatestReachLogSubscriptionVariables = Exact<{
[key: string]: never;
}>;

export type SubscribeOneLatestReachlogSubscription = {
export type SubscribeOneLatestReachLogSubscription = {
__typename?: "subscription_root";
reachLogs: Array<{ __typename?: "ReachLogs"; reachNum: number }>;
};
Expand Down Expand Up @@ -2451,15 +2451,15 @@ export type GetOneLatestReachLogQueryResult = Apollo.QueryResult<
GetOneLatestReachLogQuery,
GetOneLatestReachLogQueryVariables
>;
export const SubscribeOneLatestReachlogDocument = gql`
subscription SubscribeOneLatestReachlog {
export const SubscribeOneLatestReachLogDocument = gql`
subscription SubscribeOneLatestReachLog {
reachLogs(orderBy: { createdAt: DESC }, limit: 1) {
reachNum
}
}
`;
export type SubscribeOneLatestReachlogSubscriptionResult =
Apollo.SubscriptionResult<SubscribeOneLatestReachlogSubscription>;
export type SubscribeOneLatestReachLogSubscriptionResult =
Apollo.SubscriptionResult<SubscribeOneLatestReachLogSubscription>;
export const GetListReachLogsAfterTimestampDocument = gql`
query GetListReachLogsAfterTimestamp($timestamp: timestamptz!) {
reachLogs(
Expand Down
12 changes: 5 additions & 7 deletions view-user/src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ import {
CreateOneStampTriggerDocument,
CreateOneReachRecordDocument,
GetOneLatestReachLogDocument,
} from "@/types/graphql";
import type {
CreateOneStampTriggerMutation,
CreateOneStampTriggerMutationVariables,
CreateOneReachRecordMutation,
CreateOneReachRecordMutationVariables,
GetOneLatestReachLogQuery,
type CreateOneStampTriggerMutation,
type CreateOneStampTriggerMutationVariables,
type CreateOneReachRecordMutation,
type CreateOneReachRecordMutationVariables,
type GetOneLatestReachLogQuery,
} from "@/types/graphql";
import { ja, en } from "@/locales";
import { TwitterPicker } from "react-color";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import type { SubscribeListNumbersSubscription } from "@/types/graphql";
import { type SubscribeListNumbersSubscription } from "@/types/graphql";
import styles from "./NumberCardList.module.css";
import NumberCardSmall from "../NumberCardSmall";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import styles from "./NumberCardSmall.module.css";
import type { SubscribeListNumbersSubscription } from "@/types/graphql";
import { type SubscribeListNumbersSubscription } from "@/types/graphql";

interface NumberCardSmallProps {
BingoNumber: SubscribeListNumbersSubscription["numbers"][number];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import styles from "./PrizeCard.module.css";
import type { GetListPrizesQuery } from "@/types/graphql";
import { type GetListPrizesQuery } from "@/types/graphql";
import { useRouter } from "next/router";
import classNames from "classnames";
import { en, ja } from "@/locales";
Expand Down
6 changes: 4 additions & 2 deletions view-user/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import { useRouter } from "next/router";
import React, { useEffect, useState, useCallback } from "react";
import styles from "@/styles/Home.module.css";
import { useSubscription } from "@apollo/client";
import { SubscribeListNumbersDocument } from "@/types/graphql";
import type { SubscribeListNumbersSubscription } from "@/types/graphql";
import {
SubscribeListNumbersDocument,
type SubscribeListNumbersSubscription,
} from "@/types/graphql";
import { Layout, Loading, NumberCardLarge, NumberCardList } from "@/components";
import { ja, en } from "@/locales";

Expand Down
6 changes: 2 additions & 4 deletions view-user/src/pages/prizes/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import { useQuery, useSubscription } from "@apollo/client";
import {
GetListPrizesDocument,
SubscribeListPrizesIsWonDocument,
} from "@/types/graphql";
import type {
GetListPrizesQuery,
SubscribeListPrizesIsWonSubscription,
type GetListPrizesQuery,
type SubscribeListPrizesIsWonSubscription,
} from "@/types/graphql";
import { useRecoilState } from "recoil";
import { bingoPrizeState } from "../../Atom/atom";
Expand Down
Loading