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
33 changes: 18 additions & 15 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,36 @@
name: Frontend CI
name: frontend

on:
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]

jobs:
frontend:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend

defaults:
run:
working-directory: frontend
working-directory: ./frontend

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
node-storage: "npm"
node-version: 20

- name: Install dependencies
run: npm ci

- run: npm ci
- name: Lint check
run: npm run lint

- run: npm run build
- name: Type check
run: npm run typecheck

- run: npm audit --audit-level=high
- name: Build project
run: npm run build
52 changes: 23 additions & 29 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 4 additions & 8 deletions frontend/src/app/applications/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ export default function MyApplicationsPage() {
</div>
) : error ? (
<Card className="p-4">
<p className="text-[13px] font-semibold text-destructive">Failed to load your applications</p>
<p className="text-[13px] font-semibold text-destructive">
Failed to load your applications
</p>
<p className="mt-1 text-[12px] text-muted-foreground">
{error instanceof Error ? error.message : "Unknown error"}
</p>
Expand Down Expand Up @@ -180,17 +182,11 @@ function ApplicationCard({
</div>

<div className="flex flex-col items-end gap-2">
<Button
size="sm"
variant="outline"
disabled={!canWithdraw || busy}
onClick={onWithdraw}
>
<Button size="sm" variant="outline" disabled={!canWithdraw || busy} onClick={onWithdraw}>
{busy ? "Withdrawing…" : "Withdraw"}
</Button>
</div>
</div>
</Card>
);
}

Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ export function ApplicationStatusBadge({ status }: { status: ApplicationStatus }
status === "reviewing" && "bg-warning/10 text-warning border border-warning/30",
status === "accepted" && "bg-success/10 text-success border border-success/30",
status === "rejected" && "bg-destructive/10 text-destructive border border-destructive/30",
status === "withdrawn" && "bg-destructive/10 text-destructive border border-destructive/30 opacity-70",
status === "withdrawn" &&
"bg-destructive/10 text-destructive border border-destructive/30 opacity-70",
);

return <span className={className}>{status}</span>;
}

9 changes: 4 additions & 5 deletions frontend/src/components/applications/ApplicationsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ export function ApplicationsList({ projectId, className }: Props) {
queryFn: () => getProjectApplications(projectId),
});

const [optimistic, setOptimistic] = useState<Record<UUID, ApplicationResponse["status"]>>(
{},
);
const [optimistic, setOptimistic] = useState<Record<UUID, ApplicationResponse["status"]>>({});

const apps = useMemo(() => {
if (!data) return [];
Expand Down Expand Up @@ -120,7 +118,9 @@ export function ApplicationsList({ projectId, className }: Props) {
<div className="flex items-center justify-between gap-3">
<div>
<p className="text-[13px] font-semibold text-foreground">Applications</p>
<p className="mt-1 text-[12px] text-muted-foreground">Review applicants and update status.</p>
<p className="mt-1 text-[12px] text-muted-foreground">
Review applicants and update status.
</p>
</div>
<div className="min-w-0">
<Input
Expand Down Expand Up @@ -267,4 +267,3 @@ export function ApplicationsList({ projectId, className }: Props) {
</Card>
);
}

Loading
Loading