File tree Expand file tree Collapse file tree 5 files changed +21
-1
lines changed
Expand file tree Collapse file tree 5 files changed +21
-1
lines changed Original file line number Diff line number Diff line change 11NEXT_PUBLIC_AUTH_PASSWORD_HASH="password_hashed_via_sha256"
2+ NEXT_PUBLIC_SESSIONIZE_ID="ih39r9wq"
Original file line number Diff line number Diff line change 2222 "react-dom" : " 18.2.0" ,
2323 "react-i18next" : " 11.18.6" ,
2424 "react-rewards" : " ^2.0.4" ,
25+ "swr" : " 2.0.3" ,
2526 "use-local-storage-state" : " 18.1.1"
2627 },
2728 "devDependencies" : {
Original file line number Diff line number Diff line change 11import type { NextPage } from 'next'
22import { Layout } from 'src/components/commons'
33import { useTranslation } from 'react-i18next'
4+ import { useSessionize } from 'src/modules/sessionize/hooks'
45import {
56 MainVisual ,
67 TopDescription ,
@@ -12,6 +13,10 @@ import {
1213export const PageTop : NextPage = ( ) => {
1314 const { t } = useTranslation ( )
1415
16+ // TODO(@maito1201): 取得したデータを基にセッションデータを表示する
17+ const { data } = useSessionize ( )
18+ console . log ( 'session data' , data )
19+
1520 return (
1621 < Layout >
1722 < MainVisual />
Original file line number Diff line number Diff line change 1+ import useSWR , { Fetcher } from 'swr'
2+
3+ const fetcher : Fetcher < string > = ( url : string ) : Promise < any > => fetch ( url ) . then ( res => res . json ( ) )
4+ export const useSessionize = ( ) => {
5+ return useSWR ( `https://sessionize.com/api/v2/${ process . env . NEXT_PUBLIC_SESSIONIZE_ID } /view/All` , fetcher )
6+ }
Original file line number Diff line number Diff line change @@ -10993,6 +10993,13 @@ supports-preserve-symlinks-flag@^1.0.0:
1099310993 resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09"
1099410994 integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==
1099510995
10996+ 10997+ version "2.0.3"
10998+ resolved "https://registry.yarnpkg.com/swr/-/swr-2.0.3.tgz#9fe59a17f55b0fdddccd76b7b2f723f9f8e2263e"
10999+ integrity sha512-sGvQDok/AHEWTPfhUWXEHBVEXmgGnuahyhmRQbjl9XBYxT/MSlAzvXEKQpyM++bMPaI52vcWS2HiKNaW7+9OFw==
11000+ dependencies:
11001+ use-sync-external-store "^1.2.0"
11002+
1099611003symbol.prototype.description@^1.0.0:
1099711004 version "1.0.5"
1099811005 resolved "https://registry.yarnpkg.com/symbol.prototype.description/-/symbol.prototype.description-1.0.5.tgz#d30e01263b6020fbbd2d2884a6276ce4d49ab568"
1155611563 resolved "https://registry.yarnpkg.com/use-local-storage-state/-/use-local-storage-state-18.1.1.tgz#40e535aebed7770258e0a3a7b6923a86d9c0c52f"
1155711564 integrity sha512-09bl6q3mkSlkEt8KeBPCmdPEWEojWYF70Qbz+7wkfQX1feaFITM9m84+h0Jr6Cnf/IvpahkFh7UbX2VNN3ioTQ==
1155811565
11559- 11566+ [email protected] , use-sync-external-store@^1.2.0 :
1156011567 version "1.2.0"
1156111568 resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
1156211569 integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
You can’t perform that action at this time.
0 commit comments