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

221: Add basic error boundaries #238

Merged
merged 18 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions frontend/src/components/navbar/UserMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,13 @@ const UserMenu = () => {
style={{ cursor: 'pointer' }}
imageProps={{ referrerPolicy: 'no-referrer' }}
/>
<Menu.Dropdown>
<Menu.Item onClick={() => navigate('/user')}>Profile</Menu.Item>
<Menu.Item onClick={() => navigate('/dashboard')}>
Dashboard
</Menu.Item>
<Menu.Item onClick={() => navigate('/settings')}>Settings</Menu.Item>
<Menu.Item onClick={() => logout(navigate)}>Log out</Menu.Item>
</Menu.Dropdown>
</Menu.Target>
<Menu.Dropdown>
<Menu.Item onClick={() => navigate('/user')}>Profile</Menu.Item>
<Menu.Item onClick={() => navigate('/dashboard')}>Dashboard</Menu.Item>
<Menu.Item onClick={() => navigate('/settings')}>Settings</Menu.Item>
<Menu.Item onClick={() => logout(navigate)}>Log out</Menu.Item>
</Menu.Dropdown>
</Menu>
);
};
Expand Down
14 changes: 7 additions & 7 deletions frontend/src/rmoods/client/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ export const DataSourceSchema = z.object({
const GoogleUserInfoSchema = z.object({
sub: z.string(),
name: z.string(),
given_name: z.string(),
family_name: z.string().nullable(),
givenName: z.string(),
familyName: z.string().nullable(),
picture: z.string().url(),
email: z.string().email(),
email_verified: z.boolean(),
emailVerified: z.boolean(),
});

const LanguageResponseSchema = z.object({
Expand All @@ -67,7 +67,7 @@ const LanguageResponseSchema = z.object({
});

const NlpMetadataSchema = z.object({
generated_in: z.number(),
generatedIn: z.number(),
});

const NlpAnalysisSchema = z.object({
Expand All @@ -76,9 +76,9 @@ const NlpAnalysisSchema = z.object({
});

const ReportMetadataSchema = z.object({
created_at: z.number(),
user_info: GoogleUserInfoSchema,
is_public: z.boolean(),
createdAt: z.number(),
userInfo: GoogleUserInfoSchema,
isPublic: z.boolean(),
});

const ReportResponseSchema = z.object({
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/routes/user/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { PageFallback } from '../fallbacks/PageFallback.tsx';
*/
export interface User {
name: string;
given_name: string;
givenName: string;
SebastianNowak01 marked this conversation as resolved.
Show resolved Hide resolved
email: string;
picture: string;
}
Expand Down
Loading