diff --git a/app/components/popup/success-modal.tsx b/app/components/popup/success-modal.tsx index b5519c4..9eca451 100644 --- a/app/components/popup/success-modal.tsx +++ b/app/components/popup/success-modal.tsx @@ -31,10 +31,9 @@ const DESCRIPTIONS: DescriptionMap = { } export const SuccessModal = ({ isOpen, onClose }: ModalProperties) => { - if (!isOpen) return - - const message = - DESCRIPTIONS[isOpen] || 'Terjadi kesalahan. Silakan coba lagi.' + const message = isOpen + ? DESCRIPTIONS[isOpen] + : 'Terjadi kesalahan. Silakan coba lagi.' return ( { transition />
- + -
- )} + {isOpen && + ['resetPassword', 'register', 'payment'].includes(isOpen) && ( +
+ {APP.title} + +
+ )} {isOpen === 'warning' && (
{ + const { setIsSuccessOpen } = useNewsContext() const [currentIndex, setCurrentIndex] = useState(0) const { pathname } = useLocation() const hasCategory = pathname.includes('/category/') @@ -65,7 +67,7 @@ export const Carousel = (properties: TNews) => { > {items .slice(currentIndex * itemsPerPage, (currentIndex + 1) * itemsPerPage) - .map(({ featured, title, content, tags, slug }, index) => ( + .map(({ featured, title, content, tags, slug, isPremium }, index) => (
{ type === 'hero' ? 'gap-7' : 'gap-4', )} > -
- {tags?.map((item, index) => ( +
+ {tags?.map((item) => ( {item} ))} + {isPremium && ( + + Premium Content + + )}
@@ -117,8 +129,14 @@ export const Carousel = (properties: TNews) => {