'use client';

import './style.scss';
import { useState, useEffect } from 'react';
import Image from 'next/image';
import Link from 'next/link';
import Pagination from '@/app/component/Pagination';

export default function View() {
	const [error, setError] = useState<string>('');
	const [loading, setLoading] = useState<boolean>(true);

	const [total, setTotal] = useState<number>(0);
	const [page, setPage] = useState<number>(1);
	// const [logs, setLogs] = useState<LoginLog[]>([]);


	useEffect(() => {

	}, []);

	return (
		<>
			{/* NEWS */}
			<section id='news'>
				<p>NEWS</p>

				<hr />

				<article>
					<div>
						<img src='/resources/no-image.png' alt='news' />
					</div>
					<div>
						<Link href='#'>Bitcoin Dominance At Risk Of Crash To 40%, Why This Is Good For Ethereum, XRP, And Altcoins</Link>
						<span>2025.04.20 12:52</span>
					</div>
					<div>
						The Bitcoin dominance in the cryptocurrency market is inching dangerously close to a long-term resistance level that has triggered major reversals in the past. This resistance level is highlighted on the weekly BTC.D candlestick timeframe chart.  Each time the dominance taps this descending trendli...
					</div>
				</article>

				<hr />
				<br />

				<Pagination total={total} page={page} onPageChange={setPage} />

			</section>
		</>
	);
}