Commit 902a858f authored by Phạm Quang Bảo's avatar Phạm Quang Bảo

fix/scroll to top, detail news category

parent 9987245a
...@@ -41,7 +41,7 @@ const NewsDetailPage = () => { ...@@ -41,7 +41,7 @@ const NewsDetailPage = () => {
<ListCategory categories={MEDIA_INFORMATION_CATEGORIES} /> <ListCategory categories={MEDIA_INFORMATION_CATEGORIES} />
<div className="grid grid-cols-1 lg:grid-cols-3 gap-5"> <div className="grid grid-cols-1 lg:grid-cols-3 gap-5">
{/* Main content */} {/* Main content */}
<main className="lg:col-span-2 bg-white border rounded-md p-7"> <main className="lg:col-span-2 bg-white border rounded-md p-8">
<div className='pb-5 text-primary text-2xl leading-normal font-medium'> <div className='pb-5 text-primary text-2xl leading-normal font-medium'>
{data?.responseData?.title} {data?.responseData?.title}
</div> </div>
...@@ -53,7 +53,7 @@ const NewsDetailPage = () => { ...@@ -53,7 +53,7 @@ const NewsDetailPage = () => {
<hr /> <hr />
</div> </div>
<div className='flex-1 text-app-grey text-base overflow-hidden'> <div className='flex-1 text-app-grey text-base overflow-hidden'>
<div className="p-7.5 prose tiptap overflow-hidden">{parse(data?.responseData?.description ?? '')}</div> <div className="prose tiptap overflow-hidden">{parse(data?.responseData?.description ?? '')}</div>
</div> </div>
</main> </main>
{/* Sidebar */} {/* Sidebar */}
......
...@@ -21,8 +21,7 @@ export default function ScrollToTopButton() { ...@@ -21,8 +21,7 @@ export default function ScrollToTopButton() {
return ( return (
<button <button
onClick={scrollToTop} onClick={scrollToTop}
className={`fixed bottom-25 right-6 bg-[#e8c518] hover:text-[#063e8e] text-white p-3 rounded-lg shadow-lg transition-all duration-500 cursor-pointer ${ className={`fixed z-50 bottom-20 right-8 bg-[#e8c518] hover:text-[#063e8e] text-white p-3 rounded-lg shadow-lg transition-all duration-500 cursor-pointer ${visible
visible
? "opacity-100 translate-y-0" ? "opacity-100 translate-y-0"
: "opacity-0 translate-y-3 pointer-events-none" : "opacity-0 translate-y-3 pointer-events-none"
}`} }`}
......
...@@ -20,7 +20,7 @@ export default function Page() { ...@@ -20,7 +20,7 @@ export default function Page() {
const { data: allData, isLoading } = useGetNews<GetNewsResponseType>({ const { data: allData, isLoading } = useGetNews<GetNewsResponseType>({
pageSize: String(pageSize), pageSize: String(pageSize),
currentPage: String(page), currentPage: String(page),
filters: submitSearch ? `title @=${submitSearch}` : undefined, filters: submitSearch ? `title @=${submitSearch}` : `category @=Tin VCCI`,
}); });
return ( return (
<div className="min-h-screen container mx-auto p-4"> <div className="min-h-screen container mx-auto p-4">
......
...@@ -29,7 +29,7 @@ const ListCategory: React.FC<{ categories?: Category[] }> = ({ ...@@ -29,7 +29,7 @@ const ListCategory: React.FC<{ categories?: Category[] }> = ({
}; };
return ( return (
<div className="border-t border-gray-200 bg-white p-2.5"> <div className="border-t border-gray-200 bg-white py-2">
<div className="w-full px-4 sm:px-6 lg:px-8"> <div className="w-full px-4 sm:px-6 lg:px-8">
<div className="py-3"> <div className="py-3">
<div className="flex flex-wrap items-center max-w-full overflow-x-auto"> <div className="flex flex-wrap items-center max-w-full overflow-x-auto">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment