diff --git a/app/components/ui/flash-massage.tsx b/app/components/ui/flash-massage.tsx deleted file mode 100644 index beb2d3c..0000000 --- a/app/components/ui/flash-massage.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import { useState, useEffect } from 'react' - -type FlashMessageProperties = { - message: string - type: 'success' | 'error' | 'info' -} - -export default function FlashMessage({ - message, - type, -}: FlashMessageProperties) { - const [visible, setVisible] = useState(false) - - useEffect(() => { - if (message) { - setVisible(true) - const timer = setTimeout(() => setVisible(false), 3000) - return () => clearTimeout(timer) - } - }, [message]) - - if (!visible) return - - const messageStyles = { - success: 'bg-green-100 text-green-800 border-green-300', - error: 'bg-red-100 text-red-800 border-red-300', - info: 'bg-blue-100 text-blue-800 border-blue-300', - } - - return ( -
- {message} -
- ) -} diff --git a/app/data/contents.ts b/app/data/contents.ts deleted file mode 100644 index f9aa62c..0000000 --- a/app/data/contents.ts +++ /dev/null @@ -1,51 +0,0 @@ -type TBanner = { - id: number - urlImage: string - alt: string - link: string - status: 'active' | 'draft' | 'inactive' - createdAt?: string -} - -export const BANNER: TBanner[] = [ - { - id: 1, - urlImage: '/images/banner.png', - alt: 'banner', - link: '/category/spotlight', - status: 'active', - createdAt: '2021-08-01', - }, - { - id: 2, - urlImage: 'https://placehold.co/1000x65.png', - alt: 'banner', - status: 'draft', - link: '/#', - createdAt: '2021-08-01', - }, - { - id: 3, - urlImage: 'https://placehold.co/1000x65.png', - alt: 'banner', - status: 'draft', - link: '/#', - createdAt: '2021-08-01', - }, - { - id: 4, - urlImage: '/images/banner.png', - alt: 'banner', - link: '/#', - status: 'active', - createdAt: '2021-08-01', - }, - { - id: 5, - urlImage: '/images/banner.png', - alt: 'banner', - link: '/#', - status: 'inactive', - createdAt: '2021-08-01', - }, -]