registration

This commit is contained in:
Karol Wypchlo 2021-02-16 13:15:50 +01:00
parent a343a7cf54
commit 7b24efcbf5
3 changed files with 13 additions and 24 deletions

View File

@ -142,7 +142,7 @@ export default function Layout({ title, children }) {
</a>
</Link>
<a
href
href="#"
className="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 cursor-pointer"
role="menuitem"
onClick={handleSignOut}
@ -250,7 +250,7 @@ export default function Layout({ title, children }) {
</a>
</Link>
<a
href
href="#"
onClick={handleSignOut}
className="block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700 cursor-pointer"
>

View File

@ -24,7 +24,7 @@ function Button({ children, disabled, className, ...props }) {
export default function Table({ items, count, headers, actions, offset, setOffset, pageSize = 10 }) {
useEffect(() => {
if (offset < 0) setOffset(0);
else if (offset >= count) setOffset(Math.floor(count / pageSize - 1) * pageSize);
else if (offset >= count && count > 0) setOffset(Math.floor(count / pageSize - 1) * pageSize);
else if (offset % pageSize) setOffset(offset - (offset % pageSize));
}, [offset, pageSize, setOffset]);

View File

@ -20,7 +20,8 @@ export default function Home() {
return (
<Layout title="Dashboard">
<div className="bg-white rounded-lg shadow px-5 py-6 sm:px-6">
<dl className="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-3">
{/* change to lg:grid-cols-3 when we have more stats */}
<dl className="mt-5 grid grid-cols-1 gap-5 sm:grid-cols-2 lg:grid-cols-2">
<div className="flex flex-col bg-white overflow-hidden shadow rounded-lg">
<div className="flex-grow px-4 py-5 sm:p-6">
<div className="flex items-center">
@ -53,19 +54,15 @@ export default function Home() {
<div className="bg-gray-50 px-4 py-4 sm:px-6">
<div className="text-sm">
<Link href="/payments">
<a className="font-medium text-green-600 hover:text-green-500">
View current payments<span className="sr-only">Total Subscribers stats</span>
</a>
<a className="font-medium text-green-600 hover:text-green-500">View current payments</a>
</Link>
</div>
</div>
</div>
<div className="flex flex-col bg-white overflow-hidden shadow rounded-lg">
<div className="flex-grow px-4 py-5 sm:p-6">
<div className="flex items-center">
<div className="flex-shrink-0 bg-green-500 rounded-md p-3">
{/* Heroicon name: outline/cursor-click */}
<svg
className="h-6 w-6 text-white"
xmlns="http://www.w3.org/2000/svg"
@ -90,19 +87,17 @@ export default function Home() {
</div>
</div>
<div className="bg-gray-50 px-4 py-4 sm:px-6">
{/* <div className="text-sm">
<Link href="/downloads">
<a className="font-medium text-green-600 hover:text-green-500">View all downloads</a>
<div className="text-sm">
<Link href="/uploads">
<a className="font-medium text-green-600 hover:text-green-500">View all uploads</a>
</Link>
</div> */}
</div>
</div>
</div>
<div className="flex flex-col bg-white overflow-hidden shadow rounded-lg">
{/* <div className="flex flex-col bg-white overflow-hidden shadow rounded-lg">
<div className="flex-grow px-4 py-5 sm:p-6">
<div className="flex items-center">
<div className="flex-shrink-0 bg-green-500 rounded-md p-3">
{/* Heroicon name: outline/cursor-click */}
<svg
className="h-6 w-6 text-white"
xmlns="http://www.w3.org/2000/svg"
@ -128,14 +123,8 @@ export default function Home() {
</div>
</div>
</div>
<div className="bg-gray-50 px-4 py-4 sm:px-6">
{/* <div className="text-sm">
<Link href="/uploads">
<a className="font-medium text-green-600 hover:text-green-500">View all uploads</a>
</Link>
</div> */}
</div>
</div>
<div className="bg-gray-50 px-4 py-4 sm:px-6"></div>
</div> */}
</dl>
{/* ============ */}