diff --git a/next/src/app/[locale]/(common-layout)/user/[handle]/page/[slug]/components/sub-header.tsx b/next/src/app/[locale]/(common-layout)/user/[handle]/page/[slug]/components/sub-header.tsx index cbe6795b..e0cf622d 100644 --- a/next/src/app/[locale]/(common-layout)/user/[handle]/page/[slug]/components/sub-header.tsx +++ b/next/src/app/[locale]/(common-layout)/user/[handle]/page/[slug]/components/sub-header.tsx @@ -57,9 +57,9 @@ export function SubHeader({ return (
{ tocbot.destroy(); diff --git a/next/src/app/[locale]/lib/get-page-views.ts b/next/src/app/[locale]/lib/get-page-views.ts deleted file mode 100644 index 8a6fea9b..00000000 --- a/next/src/app/[locale]/lib/get-page-views.ts +++ /dev/null @@ -1,57 +0,0 @@ -// import { BetaAnalyticsDataClient } from "@google-analytics/data"; - -// // 環境変数から認証情報とプロパティIDを取得 -// const GOOGLE_ANALYTICS_CREDENTIALS_BASE64 = -// process.env.GOOGLE_ANALYTICS_CREDENTIALS_BASE64; -// const GOOGLE_ANALYTICS_PROPERTY_ID = process.env.GOOGLE_ANALYTICS_PROPERTY_ID; - -// interface PageViewData { -// pagePath: string; -// screenPageViews: number; -// } - -// export async function getPageViews(startDate: string, endDate: string) { -// if (!GOOGLE_ANALYTICS_CREDENTIALS_BASE64 || !GOOGLE_ANALYTICS_PROPERTY_ID) { -// throw new Error( -// "Google Analytics認証情報またはプロパティIDが設定されていません。", -// ); -// } - -// try { -// const credentials = JSON.parse( -// Buffer.from(GOOGLE_ANALYTICS_CREDENTIALS_BASE64, "base64").toString( -// "ascii", -// ), -// ); -// const analyticsDataClient = new BetaAnalyticsDataClient({ credentials }); -// const [response] = await analyticsDataClient.runReport({ -// property: `properties/${GOOGLE_ANALYTICS_PROPERTY_ID}`, -// dateRanges: [{ startDate, endDate }], -// dimensions: [{ name: "pagePath" }], -// metrics: [{ name: "screenPageViews" }], -// }); - -// if (!response || !response.rows) return null; - -// const pageViewData: PageViewData[] = []; - -// for (const row of response.rows) { -// if (row.dimensionValues && row.metricValues) { -// pageViewData.push({ -// pagePath: row.dimensionValues[0].value || "", -// screenPageViews: Number.parseInt( -// row.metricValues[0].value || "0", -// 10, -// ), -// }); -// } -// } - -// return pageViewData; -// } catch (error) { -// console.error( -// "Google Analyticsのデータ取得中にエラーが発生しました:", -// error, -// ); -// } -// } diff --git a/next/src/app/globals.css b/next/src/app/globals.css index 52a8bba7..b1a8fd7b 100644 --- a/next/src/app/globals.css +++ b/next/src/app/globals.css @@ -101,19 +101,22 @@ body.virtual-keyboard-shown { margin-top: var(--visual-viewport-offset-top, 0px); } +.toc-link { + @apply !no-underline; + @apply whitespace-pre-wrap; +} .toc-link:before { @apply !hidden; } -.toc-list { - @apply text-slate-400 !list-none; -} -.toc-link { - @apply !no-underline; -} .toc-link:hover { @apply !underline; } + +.toc-list { + @apply text-slate-400; +} + .is-active-link { @apply !text-primary; }