Skip to content

Commit e674441

Browse files
committed
feat: add react email
1 parent 39eb774 commit e674441

File tree

14 files changed

+146
-34
lines changed

14 files changed

+146
-34
lines changed

apps/admin/@/molecules/nav/search-bar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import { useEffect, useRef, useState } from "react"
44
import { useRouter, useSearchParams } from "next/navigation"
55

6+
import { X } from "lucide-react"
67
import { useTranslations } from "next-intl"
78

89
import { Input } from "@/components/ui/input"
@@ -80,7 +81,7 @@ export default function SearchBar() {
8081
variant="outline"
8182
onClick={onClear}
8283
>
83-
<i className="ri-close-line text-[20px]" />
84+
<X />
8485
</Button>
8586
<Button
8687
variant="default"

apps/admin/@/molecules/user/posts/post-meta.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
import Link from "next/link"
33

44
import dayjs from "dayjs"
5+
import { Avatar, AvatarFallback, AvatarImage } from "ui"
56

6-
import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
77
import { TPostItem } from "@/types/posts"
88

99
export type PostMetaProps = {

apps/web/@/molecules/footer/theme-toggle.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import React from "react"
44

5+
import { MonitorDot, Moon, Sun } from "lucide-react"
56
import { useTheme } from "next-themes"
67
import { Button } from "ui"
78

@@ -19,21 +20,21 @@ const ThemeToggle: React.FC = () => {
1920
variant="link"
2021
className="hover:no-underline"
2122
>
22-
<i className="ri-mac-line" />
23+
<MonitorDot />
2324
</Button>
2425
<Button
2526
onClick={toggleTheme}
2627
variant="link"
2728
className="hover:no-underline"
2829
>
29-
<i className="ri-sun-line" />
30+
<Sun />
3031
</Button>
3132
<Button
3233
onClick={toggleTheme}
3334
variant="link"
3435
className="hover:no-underline"
3536
>
36-
<i className="ri-moon-line" />
37+
<Moon />
3738
</Button>
3839
</div>
3940
)

apps/web/@/molecules/nav/search-bar.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
import { useEffect, useRef, useState } from "react"
44
import { useRouter, useSearchParams } from "next/navigation"
55

6+
import { SquareX, X } from "lucide-react"
67
import { useTranslations } from "next-intl"
7-
import { Button, cn, Input } from "ui"
8+
import { Button, Input } from "ui"
89

910
export default function SearchBar() {
1011
const t = useTranslations()
@@ -71,13 +72,16 @@ export default function SearchBar() {
7172
<div className="absolute right-1 top-1 flex h-8 items-center">
7273
{searchTerm && (
7374
<>
74-
<Button
75-
className="h-8 w-8 border-none hover:bg-transparent"
76-
variant="outline"
75+
<button
76+
className="h-8 w-8 border-none"
7777
onClick={onClear}
7878
>
79-
<i className="ri-close-line text-[20px]" />
80-
</Button>
79+
<X
80+
size={20}
81+
strokeWidth={2}
82+
color="black"
83+
/>
84+
</button>
8185
<Button
8286
variant="default"
8387
onClick={onSearch}

apps/web/@/molecules/posts/post-detail/like-button/LikeButton.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client"
22

33
import { PostOnUserType, TPostItem } from "database"
4+
import { Heart } from "lucide-react"
45
import { useTranslations } from "next-intl"
56
import { Button, cn, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "ui"
67

@@ -35,11 +36,9 @@ const LikeButton: React.FC<LikeButtonProps> = ({ children, post, isLiked }: Like
3536
"hover:border-stale-300 border-stale-800 flex h-12 w-12 items-center justify-center rounded-full border bg-white p-0 text-2xl hover:bg-slate-200"
3637
)}
3738
>
38-
<i
39-
className={cn("ri-heart-3-fill", {
40-
"text-red-500": isLiked,
41-
"text-gray-500 ": !isLiked,
42-
})}
39+
<Heart
40+
fill={isLiked ? "tomato" : "gray"}
41+
color={isLiked ? "tomato" : "gray"}
4342
/>
4443
</Button>
4544
</TooltipTrigger>

apps/web/@/molecules/posts/post-item/comment-button/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from "react"
22
import Link from "next/link"
33

44
import { TPostItem } from "database"
5+
import { MessageSquareCode } from "lucide-react"
56
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "ui"
67

78
import APP_ROUTES from "@/constants/routes"
@@ -22,7 +23,7 @@ const CommentButton: React.FC<CommentButtonProps> = ({ post }) => {
2223
})}#comments`}
2324
className="flex h-8 items-center justify-center rounded-md px-2 hover:bg-slate-300"
2425
>
25-
<i className="ri-message-2-line" />
26+
<MessageSquareCode size={16} />
2627
<div className="ml-1 flex items-center text-sm text-gray-600">
2728
{post?._count?.comments || 0}
2829
</div>

apps/web/@/molecules/posts/post-item/like-button/index.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { TPostItem } from "database"
2+
import { Heart } from "lucide-react"
23
import { useTranslations } from "next-intl"
34
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Typography } from "ui"
45

@@ -15,7 +16,12 @@ const LikeButton: React.FC<LikeButtonProps> = ({ post }: LikeButtonProps) => {
1516
<Tooltip>
1617
<TooltipTrigger asChild>
1718
<div className="flex items-center gap-1">
18-
<i className="ri-heart-3-fill text-red-500" />
19+
<Heart
20+
size={16}
21+
strokeWidth={2}
22+
fill="tomato"
23+
color="tomato"
24+
/>
1925
<Typography
2026
variant="span"
2127
className="text-sm text-gray-600"

apps/web/@/molecules/user/posts/post-item.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Link from "next/link"
44

55
import { deletePost, PostStatus, TPostItem } from "database"
66
import dayjs from "dayjs"
7+
import { Bookmark, Heart } from "lucide-react"
78
import { useSession } from "next-auth/react"
89
import { useTranslations } from "next-intl"
910
import {
@@ -17,8 +18,6 @@ import {
1718
Typography,
1819
} from "ui"
1920

20-
import { togglePostStatus } from "@/actions/manage-post"
21-
2221
export default function PostItem(post: TPostItem) {
2322
const t = useTranslations()
2423
const { data: session } = useSession()
@@ -28,7 +27,7 @@ export default function PostItem(post: TPostItem) {
2827
}
2928

3029
const onTogglePostStatus = async () => {
31-
await togglePostStatus(post.id, post.postStatus)
30+
// TODO:
3231
}
3332

3433
return (
@@ -53,7 +52,10 @@ export default function PostItem(post: TPostItem) {
5352

5453
<div className="mt-2 flex gap-8">
5554
<div className="flex items-center gap-2">
56-
<i className="ri-heart-fill text-[tomato]" />
55+
<Heart
56+
size="20"
57+
color="text-[tomato]"
58+
/>
5759
<Typography
5860
variant="span"
5961
className="text-sm"
@@ -63,6 +65,10 @@ export default function PostItem(post: TPostItem) {
6365
</div>
6466
<div className="flex items-center gap-2">
6567
<i className="ri-bookmark-3-line text-blue-900" />
68+
<Bookmark
69+
size={20}
70+
strokeWidth={3}
71+
/>
6672
<Typography
6773
variant="span"
6874
className="text-sm"

apps/web/app/[lang]/layout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import "./globals.css"
22
import "ui/dist/index.css"
33
import "react-toastify/dist/ReactToastify.css"
4-
import "remixicon/fonts/remixicon.css"
54

65
import { NextIntlClientProvider, useMessages } from "next-intl"
76
import AuthProvider from "providers/authProvider"

apps/web/emails/index.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)