From 8888b585c06144d0d5f43fbf856287f6992a9cf8 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 14:36:41 +0000 Subject: [PATCH 1/9] =?UTF-8?q?next/image=E3=81=AEimport=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-admin/src/components/common/PrizeResult/PrizeResult.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/view-admin/src/components/common/PrizeResult/PrizeResult.tsx b/view-admin/src/components/common/PrizeResult/PrizeResult.tsx index e26eaf1..2ded830 100644 --- a/view-admin/src/components/common/PrizeResult/PrizeResult.tsx +++ b/view-admin/src/components/common/PrizeResult/PrizeResult.tsx @@ -2,6 +2,7 @@ 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, From 2e6799fc16033d5dfd12037c7a46719a4c09ed50 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 14:37:01 +0000 Subject: [PATCH 2/9] =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=9D=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/components/Layout/Layout.tsx | 11 ++++----- view-user/src/gql/reach_logs.gql | 2 +- view-user/src/gql/stamp_triggers.gql | 2 +- view-user/src/type/graphql.ts | 26 +++++++++++----------- 4 files changed, 21 insertions(+), 20 deletions(-) diff --git a/view-user/src/components/Layout/Layout.tsx b/view-user/src/components/Layout/Layout.tsx index 70c1714..c054cb6 100644 --- a/view-user/src/components/Layout/Layout.tsx +++ b/view-user/src/components/Layout/Layout.tsx @@ -32,7 +32,7 @@ import { ja, en } from "@/locales"; const images = [ { name: "crap", src: "/ReactionIcon/crap.png", alt: "crap icon" }, { name: "good", src: "/ReactionIcon/good.png", alt: " good icon" }, - { name: "crakcer", src: "/ReactionIcon/cracker.png", alt: "cracker icon" }, + { name: "cracker", src: "/ReactionIcon/cracker.png", alt: "cracker icon" }, { name: "heart", src: "/ReactionIcon/heart.png", alt: "heart icon" }, { name: "smile", src: "/ReactionIcon/smile.png", alt: "smile icon" }, { name: "angry", src: "/ReactionIcon/angry.png", alt: "angry icon" }, @@ -66,8 +66,9 @@ const Layout = (props: LayoutProps) => { CreateOneStampTriggerMutation, CreateOneStampTriggerMutationVariables >(CreateOneStampTriggerDocument); - const [getLatestReachLog, { data: latestReachLogData }] = - useLazyQuery(GetOneLatestReachLogDocument); + const [getLatestReachLog] = useLazyQuery( + GetOneLatestReachLogDocument, + ); const [createOneReachRecord] = useMutation< CreateOneReachRecordMutation, @@ -99,7 +100,7 @@ const Layout = (props: LayoutProps) => { } }, []); - const handleReactionsiconClick = (name: string) => { + const handleReactionClick = (name: string) => { createStampRecord({ variables: { name } }); }; @@ -180,7 +181,7 @@ const Layout = (props: LayoutProps) => { position={position} height={navBarHeight} images={images} - onClick={handleReactionsiconClick} + onClick={handleReactionClick} /> )} diff --git a/view-user/src/gql/reach_logs.gql b/view-user/src/gql/reach_logs.gql index 3f2ef7f..02b5c03 100644 --- a/view-user/src/gql/reach_logs.gql +++ b/view-user/src/gql/reach_logs.gql @@ -6,7 +6,7 @@ query GetOneLatestReachLog { } # リーチログの最新のreachNumを継続取得(Subscription) -subscription SubscribeOneLatestReachlog { +subscription SubscribeOneLatestReachLog { reachLogs(orderBy: { createdAt: DESC }, limit: 1) { reachNum } diff --git a/view-user/src/gql/stamp_triggers.gql b/view-user/src/gql/stamp_triggers.gql index df4ef73..ee13655 100644 --- a/view-user/src/gql/stamp_triggers.gql +++ b/view-user/src/gql/stamp_triggers.gql @@ -1,5 +1,5 @@ # triggerの取得(Get) -query GetStampTrrigers { +query GetStampTriggers { stampTriggers { id name diff --git a/view-user/src/type/graphql.ts b/view-user/src/type/graphql.ts index 6ae75e2..f02a5a9 100644 --- a/view-user/src/type/graphql.ts +++ b/view-user/src/type/graphql.ts @@ -2140,11 +2140,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 }>; }; @@ -2180,9 +2180,9 @@ export type CreateOneReachRecordMutation = { } | null; }; -export type GetStampTrrigersQueryVariables = Exact<{ [key: string]: never }>; +export type GetStampTriggersQueryVariables = Exact<{ [key: string]: never }>; -export type GetStampTrrigersQuery = { +export type GetStampTriggersQuery = { __typename?: "query_root"; stampTriggers: Array<{ __typename?: "StampTriggers"; @@ -2516,15 +2516,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; +export type SubscribeOneLatestReachLogSubscriptionResult = + Apollo.SubscriptionResult; export const GetListReachLogsAfterTimestampDocument = gql` query GetListReachLogsAfterTimestamp($timestamp: timestamptz!) { reachLogs( @@ -2564,17 +2564,17 @@ export type CreateOneReachRecordMutationOptions = Apollo.BaseMutationOptions< CreateOneReachRecordMutation, CreateOneReachRecordMutationVariables >; -export const GetStampTrrigersDocument = gql` - query GetStampTrrigers { +export const GetStampTriggersDocument = gql` + query GetStampTriggers { stampTriggers { id name } } `; -export type GetStampTrrigersQueryResult = Apollo.QueryResult< - GetStampTrrigersQuery, - GetStampTrrigersQueryVariables +export type GetStampTriggersQueryResult = Apollo.QueryResult< + GetStampTriggersQuery, + GetStampTriggersQueryVariables >; export const CreateOneStampTriggerDocument = gql` mutation CreateOneStampTrigger($name: String!) { From 622168d5db11241f6e2aed226447a8fab64e5a58 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 14:37:17 +0000 Subject: [PATCH 3/9] =?UTF-8?q?stamp=E9=99=8D=E4=B8=8B=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/pages/screen/index.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/view-user/src/pages/screen/index.tsx b/view-user/src/pages/screen/index.tsx index 59fe1fa..50a4cdb 100644 --- a/view-user/src/pages/screen/index.tsx +++ b/view-user/src/pages/screen/index.tsx @@ -6,12 +6,12 @@ import { useSubscription } from "@apollo/client"; import { SubscribeListNumbersDocument, SubscribeCreatedStampTriggerDocument, - SubscribeOneLatestReachlogDocument, + SubscribeOneLatestReachLogDocument, } from "@/type/graphql"; import type { SubscribeListNumbersSubscription, SubscribeCreatedStampTriggerSubscription, - SubscribeOneLatestReachlogSubscription, + SubscribeOneLatestReachLogSubscription, } from "@/type/graphql"; import { NumberCardLarge, @@ -37,7 +37,7 @@ const images: { [key: string]: string } = { type Stamp = { id: number; name: string; - createdAt: string; + createdAt?: string; }; type BingoNumbers = SubscribeListNumbersSubscription["numbers"]; @@ -94,18 +94,21 @@ const Page: NextPage = () => { ); // リーチログのサブスクリプション const { data: reachLog } = - useSubscription( - SubscribeOneLatestReachlogDocument, + useSubscription( + SubscribeOneLatestReachLogDocument, ); useEffect(() => { - if (triggers?.stampTriggers && triggers?.stampTriggers.length > 0) { + if (triggers?.stampTriggers?.length) { let latestCreatedAt = new Date(0).toISOString(); triggers.stampTriggers.forEach((stamp: Stamp) => { addCircleById(stamp.name); - if (new Date(stamp.createdAt) > new Date(latestCreatedAt)) { + if ( + stamp.createdAt && + new Date(stamp.createdAt) > new Date(latestCreatedAt) + ) { latestCreatedAt = stamp.createdAt; } }); From 19ebf30bf88ba739209716569440dcd1afe8fffe Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 14:48:31 +0000 Subject: [PATCH 4/9] =?UTF-8?q?=E5=9E=8B=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/pages/prizes/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/view-user/src/pages/prizes/index.tsx b/view-user/src/pages/prizes/index.tsx index 35a0c99..4b74d86 100644 --- a/view-user/src/pages/prizes/index.tsx +++ b/view-user/src/pages/prizes/index.tsx @@ -41,7 +41,8 @@ const Page: NextPage = () => { setBingoPrize((prizes) => prizes.map((prize) => { const updatePrize = subscription.prizes.find( - (subscriptionPrize) => subscriptionPrize.id === prize.id, + (subscriptionPrize: SubscribeListPrizesIsWonSubscription["prizes"][0]) => + subscriptionPrize.id === prize.id, ); return updatePrize ? { ...prize, isWon: updatePrize.isWon } : prize; }), From 4d314c4ba83b62f1f12dd9d4ba5abeb2dcfaa69e Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 15:00:05 +0000 Subject: [PATCH 5/9] =?UTF-8?q?lint=E5=AF=BE=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/pages/prizes/index.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/view-user/src/pages/prizes/index.tsx b/view-user/src/pages/prizes/index.tsx index 4b74d86..45e9204 100644 --- a/view-user/src/pages/prizes/index.tsx +++ b/view-user/src/pages/prizes/index.tsx @@ -41,8 +41,9 @@ const Page: NextPage = () => { setBingoPrize((prizes) => prizes.map((prize) => { const updatePrize = subscription.prizes.find( - (subscriptionPrize: SubscribeListPrizesIsWonSubscription["prizes"][0]) => - subscriptionPrize.id === prize.id, + ( + subscriptionPrize: SubscribeListPrizesIsWonSubscription["prizes"][0], + ) => subscriptionPrize.id === prize.id, ); return updatePrize ? { ...prize, isWon: updatePrize.isWon } : prize; }), From 19e125e7627b8e651aef9352ebbd2b37373cbb06 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 15:31:02 +0000 Subject: [PATCH 6/9] db-export --- api/migrations/default/1720521696814_auto/up.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/api/migrations/default/1720521696814_auto/up.sql b/api/migrations/default/1720521696814_auto/up.sql index 4648409..7106e11 100644 --- a/api/migrations/default/1720521696814_auto/up.sql +++ b/api/migrations/default/1720521696814_auto/up.sql @@ -159,8 +159,6 @@ ALTER TABLE ONLY public.prizes ADD CONSTRAINT prizes_pkey PRIMARY KEY (id); ALTER TABLE ONLY public.reach_logs ADD CONSTRAINT reach_log_pkey PRIMARY KEY (id); -ALTER TABLE ONLY public.stamp_triggers - ADD CONSTRAINT stamp_triggers_name_key UNIQUE (name); CREATE TRIGGER set_public_stamp_triggers_updated_at BEFORE UPDATE ON public.stamp_triggers FOR EACH ROW EXECUTE FUNCTION public.set_current_timestamp_updated_at(); COMMENT ON TRIGGER set_public_stamp_triggers_updated_at ON public.stamp_triggers IS 'trigger to set value of column "updated_at" to current timestamp on row update'; ALTER TABLE ONLY public.prizes From aaddb19393b9cd747449771495e91b697f802c83 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 15:31:16 +0000 Subject: [PATCH 7/9] =?UTF-8?q?=E3=82=BF=E3=82=A4=E3=83=9D=E5=AF=BE?= =?UTF-8?q?=E5=BF=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-admin/src/gql/reach_log.gql | 2 +- view-admin/src/type/graphql.ts | 58 ------------------------ view-user/src/type/graphql.ts | 76 ++++++++------------------------ 3 files changed, 20 insertions(+), 116 deletions(-) diff --git a/view-admin/src/gql/reach_log.gql b/view-admin/src/gql/reach_log.gql index 15254be..994d3ad 100644 --- a/view-admin/src/gql/reach_log.gql +++ b/view-admin/src/gql/reach_log.gql @@ -6,7 +6,7 @@ query GetOneLatestReachLog { } # リーチログの最新のreachNumを継続取得(Subscription) -subscription SubscribeOneLatestReachlog { +subscription SubscribeOneLatestReachLog { reachLogs(orderBy: { createdAt: DESC }, limit: 1) { reachNum } diff --git a/view-admin/src/type/graphql.ts b/view-admin/src/type/graphql.ts index ed75b4c..26ab7f7 100644 --- a/view-admin/src/type/graphql.ts +++ b/view-admin/src/type/graphql.ts @@ -1154,12 +1154,6 @@ export type StampTriggersBoolExp = { name?: InputMaybe; }; -/** unique or primary key constraints on table "stamp_triggers" */ -export enum StampTriggersConstraint { - /** unique or primary key constraint on columns "id" */ - stampTriggersPkey = "stamp_triggers_pkey", -} - /** input type for incrementing numeric columns in table "stamp_triggers" */ export type StampTriggersIncInput = { id?: InputMaybe; @@ -1197,13 +1191,6 @@ export type StampTriggersMutationResponse = { returning: Array; }; -/** on_conflict condition type for table "stamp_triggers" */ -export type StampTriggersOnConflict = { - constraint: StampTriggersConstraint; - updateColumns?: Array; - where?: InputMaybe; -}; - /** Ordering options when selecting data from "stamp_triggers". */ export type StampTriggersOrderBy = { createdAt?: InputMaybe; @@ -1211,11 +1198,6 @@ export type StampTriggersOrderBy = { name?: InputMaybe; }; -/** primary key columns input for table: stamp_triggers */ -export type StampTriggersPkColumnsInput = { - id: Scalars["Int"]["input"]; -}; - /** select columns of table "stamp_triggers" */ export enum StampTriggersSelectColumn { /** column name */ @@ -1272,16 +1254,6 @@ export type StampTriggersSumFields = { id?: Maybe; }; -/** update columns of table "stamp_triggers" */ -export enum StampTriggersUpdateColumn { - /** column name */ - createdAt = "createdAt", - /** column name */ - id = "id", - /** column name */ - name = "name", -} - export type StampTriggersUpdates = { /** increments the numeric columns with given value of the filtered values */ _inc?: InputMaybe; @@ -1378,8 +1350,6 @@ export type MutationRoot = { deleteReachLogsByPk?: Maybe; /** delete data from the table: "stamp_triggers" */ deleteStampTriggers?: Maybe; - /** delete single row from the table: "stamp_triggers" */ - deleteStampTriggersByPk?: Maybe; /** execute VOLATILE function "increment_latest_reach_log" which returns "reach_logs" */ incrementLatestReachLog: Array; /** insert data into the table: "images" */ @@ -1428,8 +1398,6 @@ export type MutationRoot = { updateReachLogsMany?: Maybe>>; /** update data of the table: "stamp_triggers" */ updateStampTriggers?: Maybe; - /** update single row of the table: "stamp_triggers" */ - updateStampTriggersByPk?: Maybe; /** update multiples rows of table: "stamp_triggers" */ updateStampTriggersMany?: Maybe>>; }; @@ -1488,11 +1456,6 @@ export type MutationRootDeleteStampTriggersArgs = { where: StampTriggersBoolExp; }; -/** mutation root */ -export type MutationRootDeleteStampTriggersByPkArgs = { - id: Scalars["Int"]["input"]; -}; - /** mutation root */ export type MutationRootIncrementLatestReachLogArgs = { distinctOn?: InputMaybe>; @@ -1553,13 +1516,11 @@ export type MutationRootInsertReachLogsOneArgs = { /** mutation root */ export type MutationRootInsertStampTriggersArgs = { objects: Array; - onConflict?: InputMaybe; }; /** mutation root */ export type MutationRootInsertStampTriggersOneArgs = { object: StampTriggersInsertInput; - onConflict?: InputMaybe; }; /** mutation root */ @@ -1645,13 +1606,6 @@ export type MutationRootUpdateStampTriggersArgs = { where: StampTriggersBoolExp; }; -/** mutation root */ -export type MutationRootUpdateStampTriggersByPkArgs = { - _inc?: InputMaybe; - _set?: InputMaybe; - pkColumns: StampTriggersPkColumnsInput; -}; - /** mutation root */ export type MutationRootUpdateStampTriggersManyArgs = { updates: Array; @@ -1687,8 +1641,6 @@ export type QueryRoot = { stampTriggers: Array; /** fetch aggregated fields from the table: "stamp_triggers" */ stampTriggersAggregate: StampTriggersAggregate; - /** fetch data from the table: "stamp_triggers" using primary key columns */ - stampTriggersByPk?: Maybe; }; export type QueryRootImagesArgs = { @@ -1787,10 +1739,6 @@ export type QueryRootStampTriggersAggregateArgs = { where?: InputMaybe; }; -export type QueryRootStampTriggersByPkArgs = { - id: Scalars["Int"]["input"]; -}; - export type SubscriptionRoot = { __typename?: "subscription_root"; /** fetch data from the table: "images" */ @@ -1829,8 +1777,6 @@ export type SubscriptionRoot = { stampTriggers: Array; /** fetch aggregated fields from the table: "stamp_triggers" */ stampTriggersAggregate: StampTriggersAggregate; - /** fetch data from the table: "stamp_triggers" using primary key columns */ - stampTriggersByPk?: Maybe; /** fetch data from the table in a streaming manner: "stamp_triggers" */ stampTriggersStream: Array; }; @@ -1955,10 +1901,6 @@ export type SubscriptionRootStampTriggersAggregateArgs = { where?: InputMaybe; }; -export type SubscriptionRootStampTriggersByPkArgs = { - id: Scalars["Int"]["input"]; -}; - export type SubscriptionRootStampTriggersStreamArgs = { batchSize: Scalars["Int"]["input"]; cursor: Array>; diff --git a/view-user/src/type/graphql.ts b/view-user/src/type/graphql.ts index f02a5a9..5dacf6e 100644 --- a/view-user/src/type/graphql.ts +++ b/view-user/src/type/graphql.ts @@ -1154,14 +1154,6 @@ export type StampTriggersBoolExp = { name?: InputMaybe; }; -/** unique or primary key constraints on table "stamp_triggers" */ -export enum StampTriggersConstraint { - /** unique or primary key constraint on columns "name" */ - stampTriggersNameKey = "stamp_triggers_name_key", - /** unique or primary key constraint on columns "id" */ - stampTriggersPkey = "stamp_triggers_pkey", -} - /** input type for incrementing numeric columns in table "stamp_triggers" */ export type StampTriggersIncInput = { id?: InputMaybe; @@ -1199,13 +1191,6 @@ export type StampTriggersMutationResponse = { returning: Array; }; -/** on_conflict condition type for table "stamp_triggers" */ -export type StampTriggersOnConflict = { - constraint: StampTriggersConstraint; - updateColumns?: Array; - where?: InputMaybe; -}; - /** Ordering options when selecting data from "stamp_triggers". */ export type StampTriggersOrderBy = { createdAt?: InputMaybe; @@ -1213,11 +1198,6 @@ export type StampTriggersOrderBy = { name?: InputMaybe; }; -/** primary key columns input for table: stamp_triggers */ -export type StampTriggersPkColumnsInput = { - id: Scalars["Int"]["input"]; -}; - /** select columns of table "stamp_triggers" */ export enum StampTriggersSelectColumn { /** column name */ @@ -1274,16 +1254,6 @@ export type StampTriggersSumFields = { id?: Maybe; }; -/** update columns of table "stamp_triggers" */ -export enum StampTriggersUpdateColumn { - /** column name */ - createdAt = "createdAt", - /** column name */ - id = "id", - /** column name */ - name = "name", -} - export type StampTriggersUpdates = { /** increments the numeric columns with given value of the filtered values */ _inc?: InputMaybe; @@ -1360,6 +1330,8 @@ export type TimestamptzComparisonExp = { /** mutation root */ export type MutationRoot = { __typename?: "mutation_root"; + /** execute VOLATILE function "decrement_latest_reach_log" which returns "reach_logs" */ + decrementLatestReachLog: Array; /** delete data from the table: "images" */ deleteImages?: Maybe; /** delete single row from the table: "images" */ @@ -1378,8 +1350,8 @@ export type MutationRoot = { deleteReachLogsByPk?: Maybe; /** delete data from the table: "stamp_triggers" */ deleteStampTriggers?: Maybe; - /** delete single row from the table: "stamp_triggers" */ - deleteStampTriggersByPk?: Maybe; + /** execute VOLATILE function "increment_latest_reach_log" which returns "reach_logs" */ + incrementLatestReachLog: Array; /** insert data into the table: "images" */ insertImages?: Maybe; /** insert a single row into the table: "images" */ @@ -1426,12 +1398,19 @@ export type MutationRoot = { updateReachLogsMany?: Maybe>>; /** update data of the table: "stamp_triggers" */ updateStampTriggers?: Maybe; - /** update single row of the table: "stamp_triggers" */ - updateStampTriggersByPk?: Maybe; /** update multiples rows of table: "stamp_triggers" */ updateStampTriggersMany?: Maybe>>; }; +/** mutation root */ +export type MutationRootDecrementLatestReachLogArgs = { + distinctOn?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + /** mutation root */ export type MutationRootDeleteImagesArgs = { where: ImagesBoolExp; @@ -1478,8 +1457,12 @@ export type MutationRootDeleteStampTriggersArgs = { }; /** mutation root */ -export type MutationRootDeleteStampTriggersByPkArgs = { - id: Scalars["Int"]["input"]; +export type MutationRootIncrementLatestReachLogArgs = { + distinctOn?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; }; /** mutation root */ @@ -1533,13 +1516,11 @@ export type MutationRootInsertReachLogsOneArgs = { /** mutation root */ export type MutationRootInsertStampTriggersArgs = { objects: Array; - onConflict?: InputMaybe; }; /** mutation root */ export type MutationRootInsertStampTriggersOneArgs = { object: StampTriggersInsertInput; - onConflict?: InputMaybe; }; /** mutation root */ @@ -1625,13 +1606,6 @@ export type MutationRootUpdateStampTriggersArgs = { where: StampTriggersBoolExp; }; -/** mutation root */ -export type MutationRootUpdateStampTriggersByPkArgs = { - _inc?: InputMaybe; - _set?: InputMaybe; - pkColumns: StampTriggersPkColumnsInput; -}; - /** mutation root */ export type MutationRootUpdateStampTriggersManyArgs = { updates: Array; @@ -1667,8 +1641,6 @@ export type QueryRoot = { stampTriggers: Array; /** fetch aggregated fields from the table: "stamp_triggers" */ stampTriggersAggregate: StampTriggersAggregate; - /** fetch data from the table: "stamp_triggers" using primary key columns */ - stampTriggersByPk?: Maybe; }; export type QueryRootImagesArgs = { @@ -1767,10 +1739,6 @@ export type QueryRootStampTriggersAggregateArgs = { where?: InputMaybe; }; -export type QueryRootStampTriggersByPkArgs = { - id: Scalars["Int"]["input"]; -}; - export type SubscriptionRoot = { __typename?: "subscription_root"; /** fetch data from the table: "images" */ @@ -1809,8 +1777,6 @@ export type SubscriptionRoot = { stampTriggers: Array; /** fetch aggregated fields from the table: "stamp_triggers" */ stampTriggersAggregate: StampTriggersAggregate; - /** fetch data from the table: "stamp_triggers" using primary key columns */ - stampTriggersByPk?: Maybe; /** fetch data from the table in a streaming manner: "stamp_triggers" */ stampTriggersStream: Array; }; @@ -1935,10 +1901,6 @@ export type SubscriptionRootStampTriggersAggregateArgs = { where?: InputMaybe; }; -export type SubscriptionRootStampTriggersByPkArgs = { - id: Scalars["Int"]["input"]; -}; - export type SubscriptionRootStampTriggersStreamArgs = { batchSize: Scalars["Int"]["input"]; cursor: Array>; From 5916c8c02dbeaa1cc0d5d1ede52d2786a0ed754f Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 15:31:37 +0000 Subject: [PATCH 8/9] =?UTF-8?q?=E3=82=B3=E3=83=A1=E3=83=B3=E3=83=88?= =?UTF-8?q?=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/pages/screen/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view-user/src/pages/screen/index.tsx b/view-user/src/pages/screen/index.tsx index 50a4cdb..5f154b6 100644 --- a/view-user/src/pages/screen/index.tsx +++ b/view-user/src/pages/screen/index.tsx @@ -43,7 +43,7 @@ type Stamp = { type BingoNumbers = SubscribeListNumbersSubscription["numbers"]; const sortedBingoNumbers = (bingoNumbers: BingoNumbers) => { - return [...bingoNumbers].sort((a, b) => a.id - b.id); // idで昇順にソート + return [...bingoNumbers].sort((a, b) => a.id - b.id); }; // 最後に追加されたビンゴ番号(最新の番号)を取得 From f89892c59e5ecb0dd8c9ccf94e0e28430a297d17 Mon Sep 17 00:00:00 2001 From: hikahana <22.h.hanada.nutfes@gmail.com> Date: Mon, 9 Sep 2024 15:31:46 +0000 Subject: [PATCH 9/9] =?UTF-8?q?=E3=82=AA=E3=83=97=E3=82=B7=E3=83=A7?= =?UTF-8?q?=E3=83=8A=E3=83=AB=E4=BB=98=E4=B8=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/common/NumberCardLarge/NumberCardLarge.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view-user/src/components/common/NumberCardLarge/NumberCardLarge.tsx b/view-user/src/components/common/NumberCardLarge/NumberCardLarge.tsx index 1d72eac..7a9ca70 100644 --- a/view-user/src/components/common/NumberCardLarge/NumberCardLarge.tsx +++ b/view-user/src/components/common/NumberCardLarge/NumberCardLarge.tsx @@ -9,7 +9,7 @@ interface NumberCardLargeProps { const NumberCardLarge = (props: NumberCardLargeProps) => { return (
-
{props.bingoNumber.number}
+
{props?.bingoNumber?.number}
); };