Skip to content

Commit

Permalink
chore: enable dashboard mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
martines3000 committed Dec 23, 2024
1 parent 234518c commit 7d88ae5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
12 changes: 1 addition & 11 deletions apps/frontend/src/app/(core)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,14 @@
import { DashboardView } from '@/components/DashboardView';
import { isMobile } from '@/utils/isMobile';
import type { Metadata } from 'next';
import { headers } from 'next/headers';

export const metadata: Metadata = {
title: { absolute: 'Swaylend | Lending reimagined' },
};

export default function Home() {
const userAgent = headers().get('user-agent') || '';
const mobile = isMobile(userAgent);
return (
<div className="max-h-full">
{mobile ? (
<div className="w-full h-[60dvh] flex items-center justify-center">
This page is not available on mobile devices.
</div>
) : (
<DashboardView />
)}
<DashboardView />
</div>
);
}
3 changes: 0 additions & 3 deletions apps/frontend/src/components/LeaderboardView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ export const LeaderboardView = () => {
</table>
</div>
</div>
{/* <div className="lg:hidden w-full h-[60dvh] flex items-center justify-center">
This page is not supported on this screen size.
</div> */}
</>
);
};
2 changes: 1 addition & 1 deletion apps/frontend/src/components/Navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export const Navbar = ({ mobile = false }: { mobile?: boolean }) => {
</div>
<div className="flex items-center gap-x-2">
<Points />
{!mobile && <ConnectButton />}
<ConnectButton />
</div>
</div>
<Line />
Expand Down

0 comments on commit 7d88ae5

Please sign in to comment.