Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 9 additions & 7 deletions getcloser/frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ const compat = new FlatCompat({
});

const eslintConfig = [
{
ignores: [
'node_modules/**',
'.next/**',
'out/**',
'build/**',
'next-env.d.ts',
],
},
...compat.extends('next/core-web-vitals', 'next/typescript'),
{
rules: {
Expand All @@ -20,13 +29,6 @@ const eslintConfig = [
'object-curly-spacing': ['error', 'always'],
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
},
ignores: [
'node_modules/**',
'.next/**',
'out/**',
'build/**',
'next-env.d.ts',
],
},
];

Expand Down
3 changes: 2 additions & 1 deletion getcloser/frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export default function RootLayout({
return (
<html lang="en" style={{ background: 'linear-gradient(to bottom, hsl(160 40% 10%) 0%, hsl(160 40% 15%) 40%, hsl(160 40% 20%) 100%)' }} className="min-h-screen">
<head>
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200" rel="stylesheet" />
{/* eslint-disable-next-line @next/next/no-page-custom-font */}
<link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=optional" rel="stylesheet" />
</head>
<body
className={`${geistSans.variable} ${geistMono.variable} ${dongle.variable} antialiased`}
Expand Down
6 changes: 2 additions & 4 deletions getcloser/frontend/src/app/page2/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const WaitingView = ({ teamMembers, myId, teamId }: { teamMembers: TeamMember[],

const handleLeaveTeam = async () => {
try {
await authenticatedFetch(`/api/v1/teams/${teamId}/cancel`, {
await authenticatedFetch(`/api/v1/teams/${String(teamId)}/cancel`, {
method: 'POST',
});
} catch (error) {
Expand All @@ -35,8 +35,6 @@ const WaitingView = ({ teamMembers, myId, teamId }: { teamMembers: TeamMember[],
router.back();
};

const me = teamMembers.find(m => m.user_id === myId);

return (
<div className="fixed inset-0 z-50 flex items-center justify-center overflow-hidden bg-background-light dark:bg-background-dark p-4">
<div className="fixed inset-0 bg-black/50 backdrop-blur-sm z-10"></div>
Expand Down Expand Up @@ -215,7 +213,7 @@ export default function Page2() {

const interval = setInterval(async () => {
try {
const response = await authenticatedFetch(`/api/v1/teams/${teamId}/status`);
const response = await authenticatedFetch(`/api/v1/teams/${String(teamId)}/status`);
if (!response.ok) throw new Error('Failed to fetch team status');
const memberStatuses: { user_id: number, is_ready: boolean }[] = await response.json();
const membersWithNames = await Promise.all(memberStatuses.map(async (member) => {
Expand Down
16 changes: 8 additions & 8 deletions getcloser/frontend/src/store/formStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@ import { create } from 'zustand';

interface FormState {
email: string;
id: string;
id: number;
accessToken: string;
question: string;
answer: string;
teamId: string;
memberIds: string[];
teamId: number;
memberIds: number[];
setEmail: (email: string) => void;
setId: (id: string) => void;
setId: (id: number) => void;
setAccessToken: (accessToken: string) => void;
setQuestion: (question: string) => void;
setAnswer: (answer: string) => void;
setTeamId: (teamId: string) => void;
setMemberIds: (memberIds: string[]) => void;
setTeamId: (teamId: number) => void;
setMemberIds: (memberIds: number[]) => void;
}

export const useFormStore = create<FormState>((set) => ({
email: '',
id: '',
id: 0,
accessToken: '',
question: '',
answer: '',
teamId: '',
teamId: 0,
memberIds: [],
setEmail: (email) => set({ email }),
setId: (id) => set({ id }),
Expand Down
Loading