Complete MVP: language context, enhanced reporting, new pages#1
Open
abhiyankhanal wants to merge 2 commits into
Open
Complete MVP: language context, enhanced reporting, new pages#1abhiyankhanal wants to merge 2 commits into
abhiyankhanal wants to merge 2 commits into
Conversation
…w pages - Add LanguageProvider context so language toggle works across all pages - Refactor all components to use shared language context instead of local state - Add /about page with mission, values, and Code for Nepal info - Add /support page with ways to contribute (code, issues, sharing, donations) - Enhanced reporting form: file upload, all 77 Nepal districts, incident date field, inline validation with error messages, description min-length check, toast notifications via sonner, localStorage draft auto-save, working "Submit Another Report" reset, visual step indicators with checkmarks - Wire up ThemeProvider in layout with dark mode toggle in header - Fix Hero CTA buttons to link to /report and /explore using Next.js Link - Fix footer: remove dead links, point only to existing pages - Delete stale duplicate styles/globals.css - Update README with accurate setup instructions, project structure, and usage
Set up vitest with React Testing Library and jsdom. 28 tests across 5 files: - language-context: default language, toggle, shared state between consumers, error when used outside provider - districts: verifies all 77 districts, no duplicates, major districts present - reporting-form: step rendering, validation errors, step navigation, localStorage draft save/restore, conditional amount field, incident date input - header: brand name, navigation links and hrefs, language toggle switching nav - hero-section: heading, CTA links to /report and /explore, stat cards, trust indicators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/about(mission, values, Code for Nepal) and/support(contribute code, report issues, spread the word, donate)/reportand/explore, footer cleaned up to only reference existing pagesstyles/globals.cssduplicate, updated README with accurate setup instructions, project structure, and usage guideChanges Made
New Files
lib/language-context.tsx— React Context for global en/ne language statelib/districts.ts— All 77 Nepal districts organized by provinceapp/about/page.tsx+components/about-content.tsx— About pageapp/support/page.tsx+components/support-content.tsx— Support pageModified Files
app/layout.tsx— Added ThemeProvider, LanguageProvider, Sonner Toastercomponents/header.tsx— Uses language context, added dark mode toggle, Next.js Linkcomponents/footer.tsx— Uses language context, removed dead linkscomponents/hero-section.tsx— Uses language context, CTA buttons are now Linkscomponents/features-section.tsx— Uses language context, "Get Started" links to /reportcomponents/impact-section.tsx— Uses language contextcomponents/reporting-form.tsx— Major enhancement (see below)components/data-dashboard.tsx— Uses language contextcomponents/educational-content.tsx— Uses language contextREADME.md— Complete rewrite with accurate instructionsReporting Form Enhancements
<input type="file">with file list display and removalDeleted Files
styles/globals.css— stale duplicate ofapp/globals.cssTesting
npm install && npm run devand verify all 7 pages load/aboutand/supportpages render correctlynpm run build— verify clean production build