Migrate GoodAction Hub to standalone data repository API#4
Conversation
- Update app/api/data/route.ts to fetch activities from https://goodaction-hub.github.io/GoodAction-data/activities.json instead of reading local YAML files. Transforms external schema (meetup→activity, start_time/end_time→year/date) to internal format. - Update lib/bitesCatalog.ts to fetch restaurants from https://goodaction-hub.github.io/GoodAction-data/restaurants.json with city extraction and accessibility detection from features. Keeps FALLBACK_CATALOG and BITES_CATALOG alias for when API is unreachable. filterBitesCatalog() now accepts catalog as first param. - Update app/api/ai/recommend/route.ts to use async fetchBitesCatalog(). - Update components/FoodAIDialog.tsx to use FALLBACK_CATALOG with the new filterBitesCatalog(catalog, location, filter) signature. Also fix pre-existing ESLint error in SafeTranslation component (use ready flag from useTranslation instead of mounted/useEffect). Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Activities: fetch from https://goodaction-hub.github.io/GoodAction-data/activities.json Restaurants: fetch from https://goodaction-hub.github.io/GoodAction-data/restaurants.json Fonts: switch to self-hosted Inter to remove build-time Google Fonts dependency Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
TechQuery
left a comment
There was a problem hiding this comment.
将格式化选项设置为无分号、单引号,尽可能减少因格式化而带来的大量代码差异。
…l TS/TSX/JS/MJS files Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Added Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
已恢复所有原始文件,撤销了全局格式化。本次提交( Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
… to main branch state Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
…tierignore Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
所有非迁移文件已恢复至主分支状态( PR 与主分支的差异现在仅包含:
由于 lint-staged 会对所有暂存文件运行 prettier,直接提交对那 32 个文件的还原会被重新格式化。添加 Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…gle Fonts, remove hardcoded data Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
…ule.css Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
… SVGs with icon components Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
Done in |
Co-authored-by: TechQuery <19969570+TechQuery@users.noreply.github.com>
data/activities.yml,data/competitions.yml,data/conferences.yml)Loader2,MapPin) directly inapp/Barrier-Free-Bites/page.tsx— no wrapper componentscomponents/EventCard.tsxwithArrowRightfrom lucide-reactcomponents/icons/GitCodeIcon.tsxandcomponents/icons/GitHubIcon.tsx— named FC arrow function exports (export const GitCodeIcon: FC<...> = ...), noreturnkeywordOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.