Skip to content

Commit

Permalink
feat: colorful view icon
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed May 2, 2024
1 parent ae2cde2 commit ed58868
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/renderer/src/components/feed-column/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function FeedColumn({
{views.map((item, index) => (
<div
key={item.name}
className={cn(active === index && "text-zinc-800")}
className={cn(active === index && item.className)}
onClick={(e) => {
setActive(index)
setActivedList?.({
Expand Down
9 changes: 6 additions & 3 deletions src/renderer/src/pages/(main)/profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {
AvatarImage,
} from "@renderer/components/ui/avatar"
import { views } from "@renderer/lib/constants"
import { cn } from "@renderer/lib/utils"

export function Component() {
const { data: session } = useSession()
Expand All @@ -25,9 +26,11 @@ export function Component() {
<div className="overflow-y-auto">
{views.map((view, index) => (
<>
<div className="font-medium flex items-center gap-2 mb-1">
{view.icon}
{view.name}
<div className="font-semibold flex items-center gap-2 mb-1">
<span className={cn("flex", view.className)}>
{view.icon}
</span>
<span>{view.name}</span>
</div>
<FeedList
key={index}
Expand Down

0 comments on commit ed58868

Please sign in to comment.