Skip to content

Commit

Permalink
refactor: footer component
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdonado committed Apr 2, 2024
1 parent 1303904 commit b2ffbbd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 11 deletions.
24 changes: 24 additions & 0 deletions app/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
export default function Footer() {
return (
<footer className="flex w-full items-center justify-center gap-1 pb-4 text-xs text-gray-500">
<p>Made by</p>
<a
className="link"
href="https://sjdonado.github.io"
target="_blank"
rel="noreferrer"
>
@sjdonado
</a>
<span></span>
<a
className="link"
href="https://github.com/sjdonado/remix-dashboard"
target="_blank"
rel="noreferrer"
>
Source code
</a>
</footer>
);
}
13 changes: 2 additions & 11 deletions app/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { UserRole } from '~/constants/user';
import Avatar from './Avatar';
import { UserRoleBadge } from './badge/UserRoleBadge';
import { DialogModalButton } from './dialog/ConfirmationDialog';
import Footer from './Footer';

interface SidebarProps {
userSession: UserSession;
Expand Down Expand Up @@ -76,18 +77,8 @@ export default function Sidebar({ userSession, children }: SidebarProps) {
<span className="text-sm font-medium">Logout</span>
</DialogModalButton>
</li>
<li className="mt-4 text-center text-xs">
Source code available at{' '}
<a
className="link"
href="https://github.com/sjdonado/remix-dashboard"
target="_blank"
rel="noreferrer"
>
GitHub
</a>
</li>
</ul>
<Footer />
</div>
</div>
<div className="drawer-content">{children}</div>
Expand Down
2 changes: 2 additions & 0 deletions app/routes/_public.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Outlet } from '@remix-run/react';

import AppLogo from '~/components/AppLogo';
import { CustomErrorBoundary } from '~/components/CustomErrorBoundary';
import Footer from '~/components/Footer';

export default function Login() {
return (
Expand All @@ -12,6 +13,7 @@ export default function Login() {
<div className="card m-4 w-full rounded-md bg-base-100 shadow-xl sm:w-96">
<Outlet />
</div>
<Footer />
</div>
);
}
Expand Down

0 comments on commit b2ffbbd

Please sign in to comment.