Skip to content

Commit

Permalink
redirect added
Browse files Browse the repository at this point in the history
  • Loading branch information
SH20RAJ authored Mar 23, 2024
1 parent d53efc0 commit 678e275
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/[...slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ export default async ({ params }) => {
"https://api.visitorbadge.io/api/visitors?path=" + data.path
}
/>
</a>
</a>{" - "}
<a class="devlink" href={"/redirect?url="+data.url} target="_blank">Dev Community</a>
</span>
<hr />
<article
Expand Down
12 changes: 12 additions & 0 deletions src/app/redirect/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { redirect } from 'next/navigation'

export default (params) => {
console.log(params);
let url = params.searchParams.url;
redirect(url)
return (
<>
</>

)
}

0 comments on commit 678e275

Please sign in to comment.