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

投稿機能の実装 #3

Open
Fukuemon opened this issue Jun 10, 2023 · 0 comments
Open

投稿機能の実装 #3

Fukuemon opened this issue Jun 10, 2023 · 0 comments

Comments

@Fukuemon
Copy link
Owner

No description provided.

Fukuemon added a commit that referenced this issue Jun 11, 2023
types.tsで投稿の型も修正
Fukuemon added a commit that referenced this issue Jun 11, 2023
投稿一覧取得
新規投稿作成
レストラン一覧取得
新規レストラン作成
カテゴリの一覧取得
新規カテゴリ作成
Fukuemon added a commit that referenced this issue Jun 11, 2023
Fukuemon added a commit that referenced this issue Jun 12, 2023
ssgを利用して投稿を取得しようとしたが、jwt認証が必要な場合はssgを利用することができない
改善策:
投稿一覧と詳細は認証なしでみれるように変更する
Fukuemon added a commit that referenced this issue Jun 12, 2023
useEffectを使用し、ローカルストレージにjwtトークンがない場合にログインページに遷移するようにする
Fukuemon added a commit that referenced this issue Jun 12, 2023
ssgに対応するため、非同期関数をslice内のaction関数とは別で定義する
投稿の取得にはjwt認証を必要としないようにする
Fukuemon added a commit that referenced this issue Jun 12, 2023
Layoutコンポーネントの調整

NavbarとbottomNavbarの調整と、投稿の大きさを変更

3Dモデルがある場合は3Dマークを表示させる
詳細ボタンと3Dマークの幅を変更する必要あり
Fukuemon added a commit that referenced this issue Jun 12, 2023
投稿の一覧のidを取得するPostIds関数と
投稿詳細を取得するPostDetail関数を作成

Post/idの中のindex.jsにssgでid別の一つ一つの投稿を作成
PostDetailコンポーネントで詳細ページをを作っていく
Fukuemon added a commit that referenced this issue Jun 12, 2023
Fukuemon added a commit that referenced this issue Jun 12, 2023
Fukuemon added a commit that referenced this issue Jun 12, 2023
Model-viewerコンポーネントを使用して3Dモデルを表示すること自体はできた
しかし、GCSから受けとった3Dモデルは表示することができなかった
原因として、CORS関係の問題だと考えられる
GCSのパッケトのCORS設定を行う必要がある
Fukuemon added a commit that referenced this issue Jun 12, 2023
modelの大きさを調整
レスポンシブに対応するためにstyleを先に定義しておいて画面の幅に合わせて変更するようにする
Fukuemon added a commit that referenced this issue Jun 12, 2023
Fukuemon added a commit that referenced this issue Jun 12, 2023
ローカル環境でしかローカルストレージが使えないため、cookieで管理するようにする
Fukuemon added a commit that referenced this issue Jun 12, 2023
🐛 cookieを用いた認証管理に修正 #3
Fukuemon added a commit that referenced this issue Jun 13, 2023
Fukuemon added a commit that referenced this issue Jun 14, 2023
投稿データフェッチをUseSWRで行なっているので、storeで投稿データの管理をする必要がない?
レストランやカテゴリーはstoreで管理するようにする?

ログアウト時にcookieを削除するようにremoveCookie関数を定義
Fukuemon added a commit that referenced this issue Jun 14, 2023
⚡️ 現状使っていないimportやstateの削除 #3
Fukuemon added a commit that referenced this issue Jun 15, 2023
StorageのCORS設定 #3

ModelViewerコンポーネントでpropsとして投稿のモデルを受け取るように
Fukuemon added a commit that referenced this issue Jun 17, 2023
投稿テーブル内のauthorはidしか取得できないため、それをユーザーテーブルのユーザーと結びつけて表示できるようにする必要がある
Fukuemon added a commit that referenced this issue Jun 18, 2023
タイムラインなどのリアルタイム性が求められるページはSSRの方がよいみたいなので変更してみる
Fukuemon added a commit that referenced this issue Jun 18, 2023
⚡️ 一覧ページのレンダリング方式をISRからSSRに変更 #3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant