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
144 changes: 88 additions & 56 deletions frontend/package-lock.json

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

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
"@fontsource-variable/jetbrains-mono": "^5.3.0",
"@fontsource-variable/space-grotesk": "^5.3.0",
"@stellar/stellar-sdk": "^17.2.1",
"i18next": "^25.0.0",
"react": "^19.2.8",
"react-dom": "^19.2.8",
"react-i18next": "^16.0.0",
"react-router-dom": "^7.18.4"
},
"devDependencies": {
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { HashRouter, Route, Routes } from "react-router-dom";
import { useTranslation } from "react-i18next";
import { ErrorBoundary } from "./components/ErrorBoundary";
import { Layout } from "./components/Layout";
import { Empty } from "./components/ui";
Expand All @@ -8,6 +9,7 @@ import { BountyList } from "./pages/BountyList";

/** Hash routing so the build works on any static host with no rewrite rules. */
export default function App() {
const { t } = useTranslation();
return (
<ErrorBoundary>
<HashRouter>
Expand All @@ -16,10 +18,10 @@ export default function App() {
<Route index element={<BountyList />} />
<Route path="bounty/:id" element={<BountyDetail />} />
<Route path="about" element={<About />} />
<Route path="*" element={<Empty>Page not found.</Empty>} />
<Route path="*" element={<Empty>{t("app.notFound")}</Empty>} />
</Route>
</Routes>
</HashRouter>
</ErrorBoundary>
);
}
}
8 changes: 4 additions & 4 deletions frontend/src/components/BountyCard.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom";
import { formatAmount, relativeTime, splitIssueRef, tokenSymbol } from "../lib/format";
import type { Bounty } from "../lib/types";
import { Identicon, Skeleton, StatusBadge } from "./ui";

export function BountyCard({ bounty }: { bounty: Bounty }) {
const { t } = useTranslation();
const { ecosystem, text } = splitIssueRef(bounty.issueRef);
const open = bounty.status === "Open";
return (
Expand All @@ -24,12 +26,10 @@ export function BountyCard({ bounty }: { bounty: Bounty }) {
<div className="card-foot">
<span className="creator">
<Identicon address={bounty.creator} size={20} />
<span className="muted">
{bounty.claimCount} {bounty.claimCount === 1 ? "claim" : "claims"}
</span>
<span className="muted">{t("bounty.claim", { count: bounty.claimCount })}</span>
</span>
<span className={open ? "deadline-live" : "muted"}>
{open ? `Closes ${relativeTime(bounty.deadline)}` : "Closed"}
{open ? t("bounty.closesIn", { when: relativeTime(bounty.deadline) }) : t("bounty.closed")}
</span>
</div>
</Link>
Expand Down
Loading