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
18 changes: 7 additions & 11 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useEffect, useRef, useCallback, useState } from "react";
import { WikiCard } from "./components/WikiCard";
import { Loader2, Search, X, Download } from "lucide-react";
import { Loader2, Search, X, Download, Heart, Info } from "lucide-react";
import { Analytics } from "@vercel/analytics/react";
import { LanguageSelector } from "./components/LanguageSelector";
import { useLikedArticles } from "./contexts/LikedArticlesContext";
Expand Down Expand Up @@ -79,19 +79,15 @@ function App() {
</button>
</div>

<div className="fixed top-4 right-4 z-50 flex flex-col items-end gap-2">
<button
<div className="fixed top-4 right-4 z-50 flex items-end gap-2">
<Info
onClick={() => setShowAbout(!showAbout)}
className="text-sm text-white/70 hover:text-white transition-colors"
>
About
</button>
<button
/>
<Heart
onClick={() => setShowLikes(!showLikes)}
className="text-sm text-white/70 hover:text-white transition-colors"
>
Likes
</button>
className="text-sm text-white/70 hover:text-white transition-colors fill-white"
/>
<LanguageSelector />
</div>

Expand Down
5 changes: 2 additions & 3 deletions frontend/src/components/LanguageSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useState, useEffect, useRef } from "react";
import { LANGUAGES } from "../languages";
import { useLocalization } from "../hooks/useLocalization";
import { Languages } from "lucide-react";

export function LanguageSelector() {
const [showDropdown, setShowDropdown] = useState(false);
Expand Down Expand Up @@ -29,9 +30,7 @@ export function LanguageSelector() {
onClick={() => setShowDropdown(!showDropdown)}
ref={dropdownRef}
>
<button className="text-sm text-white/70 hover:text-white transition-colors">
Language
</button>
<Languages className="text-sm text-white/70 hover:text-white transition-colors" />

{showDropdown && (
<div className="absolute overflow-y-auto max-h-[205px] py-2 w-40 right-0 top-full mt-1 bg-gray-900 rounded-md shadow-lg">
Expand Down