From 426aac9ddf3aa9107ddc38a209f8370eb25540da Mon Sep 17 00:00:00 2001 From: i2_yosuke Date: Thu, 29 Aug 2024 14:14:26 +0900 Subject: [PATCH 1/4] =?UTF-8?q?[feat]=20reach=5Flogs=E3=83=86=E3=83=BC?= =?UTF-8?q?=E3=83=96=E3=83=AB=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../default/tables/public_reach_logs.yaml | 3 +++ .../databases/default/tables/tables.yaml | 1 + .../default/1720521696814_auto/up.sql | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 api/metadata/databases/default/tables/public_reach_logs.yaml diff --git a/api/metadata/databases/default/tables/public_reach_logs.yaml b/api/metadata/databases/default/tables/public_reach_logs.yaml new file mode 100644 index 00000000..edd25548 --- /dev/null +++ b/api/metadata/databases/default/tables/public_reach_logs.yaml @@ -0,0 +1,3 @@ +table: + name: reach_logs + schema: public diff --git a/api/metadata/databases/default/tables/tables.yaml b/api/metadata/databases/default/tables/tables.yaml index 967344c9..b8c4715d 100644 --- a/api/metadata/databases/default/tables/tables.yaml +++ b/api/metadata/databases/default/tables/tables.yaml @@ -1,3 +1,4 @@ - "!include public_images.yaml" - "!include public_numbers.yaml" - "!include public_prizes.yaml" +- "!include public_reach_logs.yaml" diff --git a/api/migrations/default/1720521696814_auto/up.sql b/api/migrations/default/1720521696814_auto/up.sql index a84ed6c8..a2ed8847 100644 --- a/api/migrations/default/1720521696814_auto/up.sql +++ b/api/migrations/default/1720521696814_auto/up.sql @@ -65,14 +65,32 @@ CREATE SEQUENCE public.prizes_id_seq NO MAXVALUE CACHE 1; ALTER SEQUENCE public.prizes_id_seq OWNED BY public.prizes.id; +CREATE TABLE public.reach_logs ( + id integer NOT NULL, + status boolean DEFAULT false NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + reach_num integer DEFAULT 0 NOT NULL +); +COMMENT ON TABLE public.reach_logs IS 'リーチ数を記録するテーブル'; +CREATE SEQUENCE public.reach_log_id_seq + AS integer + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; +ALTER SEQUENCE public.reach_log_id_seq OWNED BY public.reach_logs.id; ALTER TABLE ONLY public.images ALTER COLUMN id SET DEFAULT nextval('public.images_id_seq'::regclass); ALTER TABLE ONLY public.numbers ALTER COLUMN id SET DEFAULT nextval('public.numbers_id_seq'::regclass); ALTER TABLE ONLY public.prizes ALTER COLUMN id SET DEFAULT nextval('public.prizes_id_seq'::regclass); +ALTER TABLE ONLY public.reach_logs ALTER COLUMN id SET DEFAULT nextval('public.reach_log_id_seq'::regclass); ALTER TABLE ONLY public.images ADD CONSTRAINT images_pkey PRIMARY KEY (id); ALTER TABLE ONLY public.numbers ADD CONSTRAINT numbers_pkey PRIMARY KEY (id); 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.prizes ADD CONSTRAINT prizes_image_id_fkey FOREIGN KEY (image_id) REFERENCES public.images(id) ON UPDATE RESTRICT ON DELETE RESTRICT; From 61903163a991c3ce12837cf6350b63597ac12f53 Mon Sep 17 00:00:00 2001 From: i2_yosuke Date: Thu, 29 Aug 2024 22:52:14 +0900 Subject: [PATCH 2/4] =?UTF-8?q?[feat]=20codegen=E3=81=A7=E3=83=89=E3=82=AD?= =?UTF-8?q?=E3=83=A5=E3=83=A1=E3=83=B3=E3=83=88=E3=81=AE=E4=BD=9C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/gql/reach_logs.gql | 31 +++ view-user/src/type/graphql.ts | 432 +++++++++++++++++++++++++++++++ 2 files changed, 463 insertions(+) create mode 100644 view-user/src/gql/reach_logs.gql diff --git a/view-user/src/gql/reach_logs.gql b/view-user/src/gql/reach_logs.gql new file mode 100644 index 00000000..2f27b244 --- /dev/null +++ b/view-user/src/gql/reach_logs.gql @@ -0,0 +1,31 @@ +# リーチログの最新のreachNumを取得(Get) +query GetOneLatestReachLog { + reachLogs(orderBy: { createdAt: DESC }, limit: 1) { + reachNum + } +} + +# 指定したタイプスタンプ以降のリーチログを全て取得(Get) +query GetListReachLogsAfterTimestamp($timestamp: timestamptz!) { + reachLogs( + where: { createdAt: { _gt: $timestamp } } + orderBy: { createdAt: ASC } + ) { + id + status + createdAt + reachNum + } +} + +# リーチログの追加(Create) +mutation CreateOneReachRecord($status: Boolean!, $reachNum: Int!) { + insertReachLogsOne( + object: { status: $status, reachNum: $reachNum, createdAt: "now()" } + ) { + id + status + createdAt + reachNum + } +} diff --git a/view-user/src/type/graphql.ts b/view-user/src/type/graphql.ts index 88e6dbd6..214c3c0e 100644 --- a/view-user/src/type/graphql.ts +++ b/view-user/src/type/graphql.ts @@ -874,6 +874,233 @@ export type PrizesVarianceFields = { imageId?: Maybe; }; +/** リーチ数を記録するテーブル */ +export type ReachLogs = { + __typename?: "ReachLogs"; + createdAt: Scalars["timestamptz"]["output"]; + id: Scalars["Int"]["output"]; + reachNum: Scalars["Int"]["output"]; + status: Scalars["Boolean"]["output"]; +}; + +/** aggregated selection of "reach_logs" */ +export type ReachLogsAggregate = { + __typename?: "ReachLogsAggregate"; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "reach_logs" */ +export type ReachLogsAggregateFields = { + __typename?: "ReachLogsAggregateFields"; + avg?: Maybe; + count: Scalars["Int"]["output"]; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddevPop?: Maybe; + stddevSamp?: Maybe; + sum?: Maybe; + varPop?: Maybe; + varSamp?: Maybe; + variance?: Maybe; +}; + +/** aggregate fields of "reach_logs" */ +export type ReachLogsAggregateFieldsCountArgs = { + columns?: InputMaybe>; + distinct?: InputMaybe; +}; + +/** aggregate avg on columns */ +export type ReachLogsAvgFields = { + __typename?: "ReachLogsAvgFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** Boolean expression to filter rows from the table "reach_logs". All fields are combined with a logical 'AND'. */ +export type ReachLogsBoolExp = { + _and?: InputMaybe>; + _not?: InputMaybe; + _or?: InputMaybe>; + createdAt?: InputMaybe; + id?: InputMaybe; + reachNum?: InputMaybe; + status?: InputMaybe; +}; + +/** unique or primary key constraints on table "reach_logs" */ +export enum ReachLogsConstraint { + /** unique or primary key constraint on columns "id" */ + reachLogPkey = "reach_log_pkey", +} + +/** input type for incrementing numeric columns in table "reach_logs" */ +export type ReachLogsIncInput = { + id?: InputMaybe; + reachNum?: InputMaybe; +}; + +/** input type for inserting data into table "reach_logs" */ +export type ReachLogsInsertInput = { + createdAt?: InputMaybe; + id?: InputMaybe; + reachNum?: InputMaybe; + status?: InputMaybe; +}; + +/** aggregate max on columns */ +export type ReachLogsMaxFields = { + __typename?: "ReachLogsMaxFields"; + createdAt?: Maybe; + id?: Maybe; + reachNum?: Maybe; +}; + +/** aggregate min on columns */ +export type ReachLogsMinFields = { + __typename?: "ReachLogsMinFields"; + createdAt?: Maybe; + id?: Maybe; + reachNum?: Maybe; +}; + +/** response of any mutation on the table "reach_logs" */ +export type ReachLogsMutationResponse = { + __typename?: "ReachLogsMutationResponse"; + /** number of rows affected by the mutation */ + affectedRows: Scalars["Int"]["output"]; + /** data from the rows affected by the mutation */ + returning: Array; +}; + +/** on_conflict condition type for table "reach_logs" */ +export type ReachLogsOnConflict = { + constraint: ReachLogsConstraint; + updateColumns?: Array; + where?: InputMaybe; +}; + +/** Ordering options when selecting data from "reach_logs". */ +export type ReachLogsOrderBy = { + createdAt?: InputMaybe; + id?: InputMaybe; + reachNum?: InputMaybe; + status?: InputMaybe; +}; + +/** primary key columns input for table: reach_logs */ +export type ReachLogsPkColumnsInput = { + id: Scalars["Int"]["input"]; +}; + +/** select columns of table "reach_logs" */ +export enum ReachLogsSelectColumn { + /** column name */ + createdAt = "createdAt", + /** column name */ + id = "id", + /** column name */ + reachNum = "reachNum", + /** column name */ + status = "status", +} + +/** input type for updating data in table "reach_logs" */ +export type ReachLogsSetInput = { + createdAt?: InputMaybe; + id?: InputMaybe; + reachNum?: InputMaybe; + status?: InputMaybe; +}; + +/** aggregate stddev on columns */ +export type ReachLogsStddevFields = { + __typename?: "ReachLogsStddevFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** aggregate stddevPop on columns */ +export type ReachLogsStddevPopFields = { + __typename?: "ReachLogsStddevPopFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** aggregate stddevSamp on columns */ +export type ReachLogsStddevSampFields = { + __typename?: "ReachLogsStddevSampFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** Streaming cursor of the table "reach_logs" */ +export type ReachLogsStreamCursorInput = { + /** Stream column input with initial value */ + initialValue: ReachLogsStreamCursorValueInput; + /** cursor ordering */ + ordering?: InputMaybe; +}; + +/** Initial value of the column from where the streaming should start */ +export type ReachLogsStreamCursorValueInput = { + createdAt?: InputMaybe; + id?: InputMaybe; + reachNum?: InputMaybe; + status?: InputMaybe; +}; + +/** aggregate sum on columns */ +export type ReachLogsSumFields = { + __typename?: "ReachLogsSumFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** update columns of table "reach_logs" */ +export enum ReachLogsUpdateColumn { + /** column name */ + createdAt = "createdAt", + /** column name */ + id = "id", + /** column name */ + reachNum = "reachNum", + /** column name */ + status = "status", +} + +export type ReachLogsUpdates = { + /** increments the numeric columns with given value of the filtered values */ + _inc?: InputMaybe; + /** sets the columns of the filtered rows to the given values */ + _set?: InputMaybe; + /** filter the rows which have to be updated */ + where: ReachLogsBoolExp; +}; + +/** aggregate varPop on columns */ +export type ReachLogsVarPopFields = { + __typename?: "ReachLogsVarPopFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** aggregate varSamp on columns */ +export type ReachLogsVarSampFields = { + __typename?: "ReachLogsVarSampFields"; + id?: Maybe; + reachNum?: Maybe; +}; + +/** aggregate variance on columns */ +export type ReachLogsVarianceFields = { + __typename?: "ReachLogsVarianceFields"; + id?: Maybe; + reachNum?: Maybe; +}; + /** Boolean expression to compare columns of type "String". All fields are combined with logical 'AND'. */ export type StringComparisonExp = { _eq?: InputMaybe; @@ -935,6 +1162,10 @@ export type MutationRoot = { deletePrizes?: Maybe; /** delete single row from the table: "prizes" */ deletePrizesByPk?: Maybe; + /** delete data from the table: "reach_logs" */ + deleteReachLogs?: Maybe; + /** delete single row from the table: "reach_logs" */ + deleteReachLogsByPk?: Maybe; /** insert data into the table: "images" */ insertImages?: Maybe; /** insert a single row into the table: "images" */ @@ -947,6 +1178,10 @@ export type MutationRoot = { insertPrizes?: Maybe; /** insert a single row into the table: "prizes" */ insertPrizesOne?: Maybe; + /** insert data into the table: "reach_logs" */ + insertReachLogs?: Maybe; + /** insert a single row into the table: "reach_logs" */ + insertReachLogsOne?: Maybe; /** update data of the table: "images" */ updateImages?: Maybe; /** update single row of the table: "images" */ @@ -965,6 +1200,12 @@ export type MutationRoot = { updatePrizesByPk?: Maybe; /** update multiples rows of table: "prizes" */ updatePrizesMany?: Maybe>>; + /** update data of the table: "reach_logs" */ + updateReachLogs?: Maybe; + /** update single row of the table: "reach_logs" */ + updateReachLogsByPk?: Maybe; + /** update multiples rows of table: "reach_logs" */ + updateReachLogsMany?: Maybe>>; }; /** mutation root */ @@ -997,6 +1238,16 @@ export type MutationRootDeletePrizesByPkArgs = { id: Scalars["Int"]["input"]; }; +/** mutation root */ +export type MutationRootDeleteReachLogsArgs = { + where: ReachLogsBoolExp; +}; + +/** mutation root */ +export type MutationRootDeleteReachLogsByPkArgs = { + id: Scalars["Int"]["input"]; +}; + /** mutation root */ export type MutationRootInsertImagesArgs = { objects: Array; @@ -1033,6 +1284,18 @@ export type MutationRootInsertPrizesOneArgs = { onConflict?: InputMaybe; }; +/** mutation root */ +export type MutationRootInsertReachLogsArgs = { + objects: Array; + onConflict?: InputMaybe; +}; + +/** mutation root */ +export type MutationRootInsertReachLogsOneArgs = { + object: ReachLogsInsertInput; + onConflict?: InputMaybe; +}; + /** mutation root */ export type MutationRootUpdateImagesArgs = { _inc?: InputMaybe; @@ -1090,6 +1353,25 @@ export type MutationRootUpdatePrizesManyArgs = { updates: Array; }; +/** mutation root */ +export type MutationRootUpdateReachLogsArgs = { + _inc?: InputMaybe; + _set?: InputMaybe; + where: ReachLogsBoolExp; +}; + +/** mutation root */ +export type MutationRootUpdateReachLogsByPkArgs = { + _inc?: InputMaybe; + _set?: InputMaybe; + pkColumns: ReachLogsPkColumnsInput; +}; + +/** mutation root */ +export type MutationRootUpdateReachLogsManyArgs = { + updates: Array; +}; + export type QueryRoot = { __typename?: "query_root"; /** fetch data from the table: "images" */ @@ -1110,6 +1392,12 @@ export type QueryRoot = { prizesAggregate: PrizesAggregate; /** fetch data from the table: "prizes" using primary key columns */ prizesByPk?: Maybe; + /** fetch data from the table: "reach_logs" */ + reachLogs: Array; + /** fetch aggregated fields from the table: "reach_logs" */ + reachLogsAggregate: ReachLogsAggregate; + /** fetch data from the table: "reach_logs" using primary key columns */ + reachLogsByPk?: Maybe; }; export type QueryRootImagesArgs = { @@ -1172,6 +1460,26 @@ export type QueryRootPrizesByPkArgs = { id: Scalars["Int"]["input"]; }; +export type QueryRootReachLogsArgs = { + distinctOn?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type QueryRootReachLogsAggregateArgs = { + distinctOn?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type QueryRootReachLogsByPkArgs = { + id: Scalars["Int"]["input"]; +}; + export type SubscriptionRoot = { __typename?: "subscription_root"; /** fetch data from the table: "images" */ @@ -1198,6 +1506,14 @@ export type SubscriptionRoot = { prizesByPk?: Maybe; /** fetch data from the table in a streaming manner: "prizes" */ prizesStream: Array; + /** fetch data from the table: "reach_logs" */ + reachLogs: Array; + /** fetch aggregated fields from the table: "reach_logs" */ + reachLogsAggregate: ReachLogsAggregate; + /** fetch data from the table: "reach_logs" using primary key columns */ + reachLogsByPk?: Maybe; + /** fetch data from the table in a streaming manner: "reach_logs" */ + reachLogsStream: Array; }; export type SubscriptionRootImagesArgs = { @@ -1278,6 +1594,32 @@ export type SubscriptionRootPrizesStreamArgs = { where?: InputMaybe; }; +export type SubscriptionRootReachLogsArgs = { + distinctOn?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type SubscriptionRootReachLogsAggregateArgs = { + distinctOn?: InputMaybe>; + limit?: InputMaybe; + offset?: InputMaybe; + orderBy?: InputMaybe>; + where?: InputMaybe; +}; + +export type SubscriptionRootReachLogsByPkArgs = { + id: Scalars["Int"]["input"]; +}; + +export type SubscriptionRootReachLogsStreamArgs = { + batchSize: Scalars["Int"]["input"]; + cursor: Array>; + where?: InputMaybe; +}; + export type CreateOneImageMutationVariables = Exact<{ bucketName: Scalars["String"]["input"]; fileName: Scalars["String"]["input"]; @@ -1464,6 +1806,46 @@ export type UpdateOnePrizeIsWonMutation = { } | null; }; +export type GetOneLatestReachLogQueryVariables = Exact<{ + [key: string]: never; +}>; + +export type GetOneLatestReachLogQuery = { + __typename?: "query_root"; + reachLogs: Array<{ __typename?: "ReachLogs"; reachNum: number }>; +}; + +export type GetListReachLogsAfterTimestampQueryVariables = Exact<{ + timestamp: Scalars["timestamptz"]["input"]; +}>; + +export type GetListReachLogsAfterTimestampQuery = { + __typename?: "query_root"; + reachLogs: Array<{ + __typename?: "ReachLogs"; + id: number; + status: boolean; + createdAt: any; + reachNum: number; + }>; +}; + +export type CreateOneReachRecordMutationVariables = Exact<{ + status: Scalars["Boolean"]["input"]; + reachNum: Scalars["Int"]["input"]; +}>; + +export type CreateOneReachRecordMutation = { + __typename?: "mutation_root"; + insertReachLogsOne?: { + __typename?: "ReachLogs"; + id: number; + status: boolean; + createdAt: any; + reachNum: number; + } | null; +}; + export const CreateOneImageDocument = gql` mutation CreateOneImage( $bucketName: String! @@ -1725,3 +2107,53 @@ export type UpdateOnePrizeIsWonMutationOptions = Apollo.BaseMutationOptions< UpdateOnePrizeIsWonMutation, UpdateOnePrizeIsWonMutationVariables >; +export const GetOneLatestReachLogDocument = gql` + query GetOneLatestReachLog { + reachLogs(orderBy: { createdAt: DESC }, limit: 1) { + reachNum + } + } +`; +export type GetOneLatestReachLogQueryResult = Apollo.QueryResult< + GetOneLatestReachLogQuery, + GetOneLatestReachLogQueryVariables +>; +export const GetListReachLogsAfterTimestampDocument = gql` + query GetListReachLogsAfterTimestamp($timestamp: timestamptz!) { + reachLogs( + where: { createdAt: { _gt: $timestamp } } + orderBy: { createdAt: ASC } + ) { + id + status + createdAt + reachNum + } + } +`; +export type GetListReachLogsAfterTimestampQueryResult = Apollo.QueryResult< + GetListReachLogsAfterTimestampQuery, + GetListReachLogsAfterTimestampQueryVariables +>; +export const CreateOneReachRecordDocument = gql` + mutation CreateOneReachRecord($status: Boolean!, $reachNum: Int!) { + insertReachLogsOne( + object: { status: $status, reachNum: $reachNum, createdAt: "now()" } + ) { + id + status + createdAt + reachNum + } + } +`; +export type CreateOneReachRecordMutationFn = Apollo.MutationFunction< + CreateOneReachRecordMutation, + CreateOneReachRecordMutationVariables +>; +export type CreateOneReachRecordMutationResult = + Apollo.MutationResult; +export type CreateOneReachRecordMutationOptions = Apollo.BaseMutationOptions< + CreateOneReachRecordMutation, + CreateOneReachRecordMutationVariables +>; From 64c8d638ee640ed539ce0f55e5a92d71496352d6 Mon Sep 17 00:00:00 2001 From: i2_yosuke Date: Thu, 29 Aug 2024 22:53:27 +0900 Subject: [PATCH 3/4] =?UTF-8?q?[feat]=20layout=E3=82=B3=E3=83=B3=E3=83=9D?= =?UTF-8?q?=E3=83=BC=E3=83=8D=E3=83=B3=E3=83=88=E3=81=A7handleReachIconCli?= =?UTF-8?q?ck=E3=81=A8api=E3=82=92=E7=B9=8B=E3=81=8E=E5=90=88=E3=82=8F?= =?UTF-8?q?=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/components/Layout/Layout.tsx | 40 +++++++++++++++++++--- 1 file changed, 35 insertions(+), 5 deletions(-) diff --git a/view-user/src/components/Layout/Layout.tsx b/view-user/src/components/Layout/Layout.tsx index 9c47c724..7aee3ece 100644 --- a/view-user/src/components/Layout/Layout.tsx +++ b/view-user/src/components/Layout/Layout.tsx @@ -1,3 +1,13 @@ +import { useLazyQuery, useMutation } from "@apollo/client"; +import { + CreateOneReachRecordDocument, + GetOneLatestReachLogDocument, +} from "@/type/graphql"; +import type { + CreateOneReachRecordMutationVariables, + CreateOneReachRecordMutation, + GetOneLatestReachLogQuery, +} from "@/type/graphql"; import { useState, useEffect, useRef, useLayoutEffect } from "react"; import { useRouter } from "next/router"; import styles from "./Layout.module.css"; @@ -50,6 +60,14 @@ const Layout = (props: LayoutProps) => { const navRef = useRef(null); const position: string = isReachIconVisible ? "29%" : "50%"; + const [getLatestReachLog, { data: latestReachLogData }] = + useLazyQuery(GetOneLatestReachLogDocument); + + const [createOneReachRecord] = useMutation< + CreateOneReachRecordMutation, + CreateOneReachRecordMutationVariables + >(CreateOneReachRecordDocument); + // navBarの高さをstring型で渡す useLayoutEffect(() => { if (navRef.current) { @@ -66,12 +84,24 @@ const Layout = (props: LayoutProps) => { } }, []); - const handleReachIconClick = () => { - // todo リーチカウントAPIと繋ぎ込み + const handleReachIconClick = async () => { + try { + const { data } = await getLatestReachLog(); + const latestReachLogNumber = data?.reachLogs[0]?.reachNum || 0; + console.log(latestReachLogNumber); + await createOneReachRecord({ + variables: { + status: true, + reachNum: latestReachLogNumber + 1, + }, + }); - setReachIconVisible(false); - localStorage.setItem("isReachIconVisible", "false"); - setIsReachModalOpen(!isReachModalOpen); + setReachIconVisible(false); + localStorage.setItem("isReachIconVisible", "false"); + setIsReachModalOpen(!isReachModalOpen); + } catch (error) { + console.error("Failed to record reach:", error); + } }; const toggleSortOrder = () => { From 90d0dcb285175ed5917fc054834a61c375f6c347 Mon Sep 17 00:00:00 2001 From: i2_yosuke Date: Thu, 29 Aug 2024 23:23:40 +0900 Subject: [PATCH 4/4] =?UTF-8?q?[fix]=20handleReachIconClick=E9=96=A2?= =?UTF-8?q?=E6=95=B0=E5=86=85=E3=81=AEconsole.log()=E3=82=92=E5=89=8A?= =?UTF-8?q?=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- view-user/src/components/Layout/Layout.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/view-user/src/components/Layout/Layout.tsx b/view-user/src/components/Layout/Layout.tsx index 7aee3ece..ec2067de 100644 --- a/view-user/src/components/Layout/Layout.tsx +++ b/view-user/src/components/Layout/Layout.tsx @@ -88,7 +88,6 @@ const Layout = (props: LayoutProps) => { try { const { data } = await getLatestReachLog(); const latestReachLogNumber = data?.reachLogs[0]?.reachNum || 0; - console.log(latestReachLogNumber); await createOneReachRecord({ variables: { status: true,