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
2 changes: 1 addition & 1 deletion frontend/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import GitHubIntelligencePage from "./pages/GitHubIntelligencePage";
import GitHubCallbackPage from "./pages/GitHubCallbackPage";
import ProtectedRoute from "./components/shared/ProtectedRoute";
import PublicRoute from "./components/shared/PublicRoute";
import FAQSection from "./components/explore/FAQSection";
import BugReportsPage from "./pages/BugReportsPage";
export default function App() {
return (
Expand Down Expand Up @@ -113,6 +112,7 @@ export default function App() {
<Route path="/terms" element={<TermsPage/>} />
<Route path="/privacy" element={<PrivacyPage/>} />
<Route path="/bug-reports" element={<BugReportsPage />} />
<Route path="/faq" element={<FAQPage />} />
<Route path="*" element={<NotFoundPage />} />
</Routes>
</MainLayout>
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/shared/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ export default function Navbar() {
<Link to="/explore" className={navLinkCls("/explore")}>
Explore
</Link>
<Link to="/faq" className={navLinkCls("/faq")}>
FAQ
</Link>

{isAuthenticated && (
<Link to="/codeforces" className={navLinkCls("/codeforces")}>
Expand Down Expand Up @@ -577,6 +580,9 @@ export default function Navbar() {
<Link to="/explore" onClick={closeMenu} className={mobileLinkCls}>
Explore <span className="text-zinc-300 text-sm">β†’</span>
</Link>
<Link to="/faq" onClick={closeMenu} className={mobileLinkCls}>
FAQ <span className="text-zinc-300 text-sm">β†’</span>
</Link>

{isAuthenticated && (
<Link to="/codeforces" onClick={closeMenu} className={mobileLinkCls}>
Expand Down
14 changes: 8 additions & 6 deletions frontend/src/pages/FAQPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ export default function FAQPage() {
return (
<main className="w-full overflow-x-hidden bg-white text-black">
<title>FAQ - CodeLens</title>
<meta
name="description"
content="Frequently asked questions about CodeLens – platform tracking, data privacy, open source contributions, and more."
/>
<section className="border-b-4 border-black px-6 py-20 sm:px-10 lg:px-16 lg:py-28">
<div className="mx-auto grid max-w-7xl gap-12 lg:grid-cols-[0.9fr_1.1fr] lg:items-end">
<div>
Expand Down Expand Up @@ -78,11 +82,10 @@ export default function FAQPage() {
key={item.id}
type="button"
onClick={() => toggleFaq(index, true)}
className={`break-words border-2 px-4 py-3 text-left text-xs font-black uppercase tracking-widest transition-colors ${
openIdx === index
className={`break-words border-2 px-4 py-3 text-left text-xs font-black uppercase tracking-widest transition-colors ${openIdx === index
? "border-white bg-white text-black"
: "border-white text-white hover:bg-white hover:text-black"
}`}
}`}
>
{String(index + 1).padStart(2, "0")} / {item.q}
</button>
Expand Down Expand Up @@ -125,9 +128,8 @@ export default function FAQPage() {
role="region"
aria-labelledby={buttonId}
aria-hidden={!isOpen}
className={`grid transition-all duration-300 ease-in-out ${
isOpen ? "grid-rows-[1fr] border-t-4 border-black" : "grid-rows-[0fr]"
}`}
className={`grid transition-all duration-300 ease-in-out ${isOpen ? "grid-rows-[1fr] border-t-4 border-black" : "grid-rows-[0fr]"
}`}
>
<div className="overflow-hidden">
<p className="max-w-3xl px-6 py-6 text-base font-bold leading-relaxed text-black sm:px-8 sm:text-lg">
Expand Down