Skip to content

Commit

Permalink
feat: github redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
rotimi-best committed Dec 4, 2024
1 parent 9a04a17 commit f9914b2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/components/navigation/navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@

<ArrowUpRight class="h-4" />
</Button>
<a
href="https://github.com/classroomio/classroomio"
target="_blank"
rel="noopener noreferrer"
<a href="/github" target="_blank" rel="noopener noreferrer"
><div
class="focus-visible:ring-ring inline-flex items-center justify-center whitespace-nowrap font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground rounded-md text-xs h-8 w-8 px-0"
>
Expand Down
5 changes: 5 additions & 0 deletions vite_server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { serveDir } from 'https://deno.land/[email protected]/http/file_server.ts';

serve(async (req) => {
const url = new URL(req.url);

if (url.pathname.includes('github')) {
return Response.redirect('https://github.com/classroomio/naija-stars', 302);
}

let isIndex = url.pathname === '/' || url.pathname === '/index.html';

let res = await serveDir(req, {
Expand Down

0 comments on commit f9914b2

Please sign in to comment.