Skip to content

Commit

Permalink
Add link to Cloudflare admin
Browse files Browse the repository at this point in the history
  • Loading branch information
benvinegar committed Jan 2, 2024
1 parent b7c9062 commit 3622f13
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export default function App() {
</div>
<div className="flex items-center">
<a href="/dashboard" className="text-lg font-medium">Dashboard</a>
<a href="/admin-redirect" target="_blank" className="text-lg font-medium ml-4">Admin</a>
<a href="https://github.com/benvinegar/counterscale" className="w-8 ml-4">
<img src="/github-mark.svg" style={{ filter: "invert(21%) sepia(27%) saturate(271%) hue-rotate(113deg) brightness(97%) contrast(97%);" }} />
</a>
Expand Down
5 changes: 5 additions & 0 deletions app/routes/admin-redirect.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { LoaderFunctionArgs, redirect } from "@remix-run/cloudflare";

export const loader = async ({ context, request }: LoaderFunctionArgs) => {
return redirect(`https://dash.cloudflare.com/${context.env.CF_ACCOUNT_ID}/workers/services/view/counterscale/production`);
};

0 comments on commit 3622f13

Please sign in to comment.