-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: add new empty pages #40
Conversation
Warning Rate limit exceeded@yamashita-kenngo has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 27 minutes and 27 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ウォークスルーこの変更では、ダッシュボードのナビゲーションと認証機能を強化するために、新しいコンポーネントやルートが追加されました。特に、 変更点
詩
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Visit the preview URL for this PR (updated for commit b5feb42): https://autonomy-tegata-dev--pr40-feat-add-empty-pages-qftg00iy.web.app (expires Fri, 14 Jun 2024 09:41:58 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 372cb972329a2dd7e3813bc6bde2f0d317d6488e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (13)
- app/src/contents/common/header.test.tsx (1 hunks)
- app/src/contents/common/header.tsx (1 hunks)
- app/src/index.tsx (2 hunks)
- app/src/pages/account/account.test.tsx (2 hunks)
- app/src/pages/account/account.tsx (1 hunks)
- app/src/pages/login/login.tsx (2 hunks)
- app/src/pages/product/product.test.tsx (1 hunks)
- app/src/pages/product/product.tsx (1 hunks)
- app/src/pages/setting/setting.test.tsx (1 hunks)
- app/src/pages/setting/setting.tsx (1 hunks)
- app/src/pages/tenant/tenant.test.tsx (1 hunks)
- app/src/pages/tenant/tenant.tsx (1 hunks)
- app/src/service/auth.ts (1 hunks)
Files skipped from review due to trivial changes (5)
- app/src/pages/login/login.tsx
- app/src/pages/product/product.test.tsx
- app/src/pages/product/product.tsx
- app/src/pages/setting/setting.tsx
- app/src/service/auth.ts
Additional comments not posted (8)
app/src/pages/tenant/tenant.tsx (1)
1-13
: コードの変更点に問題は見当たりません。新しいTenantPage
コンポーネントが正しく追加されています。app/src/pages/account/account.test.tsx (1)
7-7
:AccountPage
のインポートは正しく行われています。app/src/contents/common/header.test.tsx (1)
1-25
:Header
コンポーネントのテストが適切に設定されています。問題は見当たりません。app/src/pages/setting/setting.test.tsx (1)
11-19
: 設定コンポーネントのテストセットアップとクリーンアップが適切に行われています。app/src/index.tsx (1)
5-11
: インポートパスが新しいディレクトリ構造に適切に更新されています。app/src/pages/account/account.tsx (1)
9-32
:AccountPage
コンポーネントが適切に定義されており、SolidJSのリアクティブ機能を正しく使用しています。app/src/contents/common/header.tsx (2)
3-23
: ヘッダーコンポーネントのナビゲーション処理が適切に行われています。
43-49
: ログアウトボタンがsignOutUser
関数を正しく呼び出し、ホームページにリダイレクトします。
app/src/pages/account/account.tsx
Outdated
async function getAccountInfo(): Promise<Account | null> { | ||
const user = await getCurrentUser(); | ||
const uid = user?.uid; | ||
const collectionName = "accounts"; | ||
const queryObj: QueryObj = { | ||
field: "id", | ||
operator: "==", | ||
value: uid, | ||
}; | ||
const result = await getDocumentsWithQuery( | ||
firestore, | ||
collectionName, | ||
queryObj, | ||
); | ||
if (result instanceof Error) { | ||
return null; | ||
} | ||
if (result.length === 0) { | ||
return null; | ||
} | ||
if (result.length > 1) { | ||
return null; | ||
} | ||
return result[0] as Account; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getAccountInfo
関数のエラーハンドリングを簡略化するためのリファクタリングを提案します。
- if (result instanceof Error) {
- return null;
- }
- if (result.length === 0) {
- return null;
- }
- if (result.length > 1) {
- return null;
- }
+ if (result instanceof Error || result.length !== 1) {
+ return null;
+ }
Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.
async function getAccountInfo(): Promise<Account | null> { | |
const user = await getCurrentUser(); | |
const uid = user?.uid; | |
const collectionName = "accounts"; | |
const queryObj: QueryObj = { | |
field: "id", | |
operator: "==", | |
value: uid, | |
}; | |
const result = await getDocumentsWithQuery( | |
firestore, | |
collectionName, | |
queryObj, | |
); | |
if (result instanceof Error) { | |
return null; | |
} | |
if (result.length === 0) { | |
return null; | |
} | |
if (result.length > 1) { | |
return null; | |
} | |
return result[0] as Account; | |
} | |
async function getAccountInfo(): Promise<Account | null> { | |
const user = await getCurrentUser(); | |
const uid = user?.uid; | |
const collectionName = "accounts"; | |
const queryObj: QueryObj = { | |
field: "id", | |
operator: "==", | |
value: uid, | |
}; | |
const result = await getDocumentsWithQuery( | |
firestore, | |
collectionName, | |
queryObj, | |
); | |
if (result instanceof Error || result.length !== 1) { | |
return null; | |
} | |
return result[0] as Account; | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
対応
b5feb42
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yamashita-kenngo, ありがとうございます!提案された変更を適用していただき、感謝いたします。他にレビューが必要な点があれば、お知らせください。🐰
If you found this review helpful, would you consider giving us a shout-out on X?
Thank you for using CodeRabbit!
Summary by CodeRabbit
新機能
Header
コンポーネントを追加。AccountPage
コンポーネントを追加。TenantPage
コンポーネントを追加。SettingPage
コンポーネントを追加。ProductPage
コンポーネントを追加。改善
/dashboard
から/dashboard/account
に変更。テスト
Header
、AccountPage
、ProductPage
、SettingPage
、TenantPage
コンポーネントのテストケースを追加。