"use client";
import styles from "../page.module.css";
import { BlogsIcon, GuideIcon, SignOutIcon } from "../../assets/images";
import { recipeDetails } from "../config/frontend";
import Link from "next/link";
import Image from "next/image";
import Session from "supertokens-auth-react/recipe/session";
import SuperTokens from "supertokens-auth-react";
const SignOutLink = (props: { name: string; link: string; icon: string }) => {
return (
{
await Session.signOut();
SuperTokens.redirectToAuth();
}}
>
{props.name}
);
};
export const LinksComponent = () => {
const links: {
name: string;
link: string;
icon: string;
}[] = [
{
name: "Blogs",
link: "https://supertokens.com/blog",
icon: BlogsIcon,
},
{
name: "Guides",
link: recipeDetails.docsLink,
icon: GuideIcon,
},
{
name: "Sign Out",
link: "",
icon: SignOutIcon,
},
];
return (
{links.map((link) => {
if (link.name === "Sign Out") {
return (
);
}
return (
{link.name}
);
})}
);
};