From 6082cf0cdbbe4f5ca5ab6320c84f3a391e244abe Mon Sep 17 00:00:00 2001
From: Ardeman
Date: Mon, 24 Feb 2025 08:23:22 +0800
Subject: [PATCH] refactor: replace interface with type for component
properties and improve code readability
---
app/components/icons/notification.tsx | 9 ++++-----
app/components/ui/breadcrumb.tsx | 3 +--
app/components/ui/card-report.tsx | 2 +-
app/components/ui/social-share.tsx | 2 +-
app/pages/news-detail/index.tsx | 9 ++++-----
5 files changed, 11 insertions(+), 14 deletions(-)
diff --git a/app/components/icons/notification.tsx b/app/components/icons/notification.tsx
index e385b6a..22ca578 100644
--- a/app/components/icons/notification.tsx
+++ b/app/components/icons/notification.tsx
@@ -1,15 +1,14 @@
import type { JSX, SVGProps } from 'react'
-interface NotificationIconProperties
- extends JSX.IntrinsicAttributes,
- SVGProps {
+type TNotificationIcon = {
showBadge?: boolean
-}
+} & JSX.IntrinsicAttributes &
+ SVGProps
export const NotificationIcon = ({
showBadge = false,
...properties
-}: NotificationIconProperties) => {
+}: TNotificationIcon) => {
return (
-
+
{/* end next planing create component for this section */}
@@ -42,10 +44,7 @@ export const NewsDetailPage = () => {
/>
-
+ {htmlParse(content)}