Skip to content
Open
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
12 changes: 12 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# GemHub frontend

Create React App 5 with React 18 and TypeScript 4. The checked-in `tsconfig.json` and `src/react-app-env.d.ts` are required for CRA to recognize the TypeScript entry point and App module.

```bash
npm ci --ignore-scripts --no-audit --no-fund
npm run lint
CI=true npm run build
npm start
```

The development proxy targets the Ruby API at `http://localhost:4567`. Build and lint checks do not verify that service or marketplace mutations. Create Gem, Sandbox, and Benchmarks currently contain coming-soon interfaces; a successful build does not make them implemented features.
2 changes: 0 additions & 2 deletions frontend/src/api/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ import {
GemResponse,
CreateGemRequest,
UpdateGemRequest,
Rating,
RatingsResponse,
RatingResponse,
CreateRatingRequest,
Badge,
BadgesResponse,
BadgeResponse,
CreateBadgeRequest,
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ function Layout({ children }: LayoutProps) {

{/* Navigation */}
<nav className="flex flex-1 flex-col">
<ul role="list" className="flex flex-1 flex-col gap-y-7">
<ul className="flex flex-1 flex-col gap-y-7">
<li>
<ul role="list" className="-mx-2 space-y-1">
<ul className="-mx-2 space-y-1">
{navigation.map((item) => {
const current = location.pathname === item.href;
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
EyeIcon,
CalendarIcon,
} from '@heroicons/react/24/outline';
import apiClient, { apiKeys, formatDownloads, formatRating, formatDate } from '../api/client';
import apiClient, { apiKeys, formatDownloads, formatRating } from '../api/client';
import { Gem } from '../types';

function Dashboard() {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/react-app-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="react-scripts" />
20 changes: 20 additions & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
}
Loading