diff --git a/apps/web/package.json b/apps/web/package.json
index 268f5db53..45376ab00 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -60,6 +60,9 @@
"@stripe/react-stripe-js": "^1.10.0",
"@stripe/stripe-js": "^1.35.0",
"@tanstack/react-query": "^4.3.9",
+ "@tiptap/extension-link": "^2.1.11",
+ "@tiptap/react": "^2.1.11",
+ "@tiptap/starter-kit": "^2.1.11",
"@tremor/react": "^2.0.0",
"@types/turndown": "^5.0.1",
"@upstash/ratelimit": "^0.4.3",
diff --git a/apps/web/pages/[user].tsx b/apps/web/pages/[user].tsx
index 16750759c..797684352 100644
--- a/apps/web/pages/[user].tsx
+++ b/apps/web/pages/[user].tsx
@@ -1,833 +1,378 @@
-import { cva } from "class-variance-authority";
-// import { createCheckoutSession } from "lib/stripe";
-import { useAuthContext } from "context/authContext";
-import { getProfile } from "lib/firebase/utils";
-import { NextSeo } from "next-seo";
+import type { DehydratedState } from "@tanstack/react-query";
+import classNames from "classnames";
+import type { GetServerSideProps, InferGetServerSidePropsType } from "next";
import Link from "next/link";
-import { CalendarPlus } from "react-bootstrap-icons";
-import { titleCase } from "title-case";
-
-import { Button, Tooltip } from "@calcom/ui";
+import { Toaster } from "react-hot-toast";
+import type { z } from "zod";
+
+import {
+ sdkActionManager,
+ useEmbedNonStylesConfig,
+ useEmbedStyles,
+ useIsEmbed,
+} from "@calcom/embed-core/embed-iframe";
+import OrganizationAvatar from "@calcom/features/ee/organizations/components/OrganizationAvatar";
+import { getSlugOrRequestedSlug } from "@calcom/features/ee/organizations/lib/orgDomains";
+import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomains";
+import { EventTypeDescriptionLazy as EventTypeDescription } from "@calcom/features/eventtypes/components";
+import EmptyPage from "@calcom/features/eventtypes/components/EmptyPage";
+import { getUsernameList } from "@calcom/lib/defaultEvents";
+import { useLocale } from "@calcom/lib/hooks/useLocale";
+import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
+import useTheme from "@calcom/lib/hooks/useTheme";
+import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
+import { stripMarkdown } from "@calcom/lib/stripMarkdown";
+import prisma from "@calcom/prisma";
+import type { EventType, User } from "@calcom/prisma/client";
+import { baseEventTypeSelect } from "@calcom/prisma/selects";
+import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
+import { HeadSeo, UnpublishedEntity } from "@calcom/ui";
+import { Verified, ArrowRight } from "@calcom/ui/components/icon";
+
+import type { EmbedProps } from "@lib/withEmbedSsr";
import PageWrapper from "@components/PageWrapper";
-import insertNonBreakingSpaces from "./ui/utilities/insert-non-breaking-spaces";
-import BioLink from "./ui/valery/bio-link";
-import BookItem from "./ui/valery/book-item";
-import CirclesBackground from "./ui/valery/circles-background";
-import ExperienceItem from "./ui/valery/experience-item";
-import FactItem from "./ui/valery/fact-item";
-import PodcastItem from "./ui/valery/podcast-item";
-import ProjectItem from "./ui/valery/project-item";
-import Publication from "./ui/valery/publication-item";
-import VideoItem from "./ui/valery/video-item";
-
-const Section = ({ title, tileLayout = false, children }) => {
- const childrenLayoutClasses = cva([], {
- variants: {
- tileLayout: {
- true: ["sm:columns-2", "gap-14"],
- false: ["flex", "flex-col", "gap-7"],
- },
- },
- });
- return (
-
- );
-};
-
-// Two-part links section.
-// Top: Links to social media, etc. (Icon-only.)
-// Bottom: Generic links
-const LinksSection = ({ links }) => {
- const iconLinks = links?.filter(
- ({ type, url }) => type !== "generic_link" && type !== "website" && url !== ""
- );
- const genericLinks = links?.filter(
- ({ type, url }) => type === "generic_link" || (type === "website" && url !== "")
- );
-
- // Two-part variant
- // return (
- //
- // {/* Icon links */}
- //
- // {iconLinks.map(({ key, url, name }, index) => (
- //
- // ))}
- //
- // {/* Generic links */}
- //
- // {genericLinks.map(({ key, url, name }, index) => (
- //
- // ))}
- //
- //
- // );
+import { ssrInit } from "@server/lib/ssr";
+
+export function UserPage(props: InferGetServerSidePropsType) {
+ const { users, profile, eventTypes, markdownStrippedBio, entity } = props;
+
+ const [user] = users; //To be used when we only have a single user, not dynamic group
+ useTheme(profile.theme);
+ const { t } = useLocale();
+
+ const isBioEmpty = !user.bio || !user.bio.replace("
", "").length;
+
+ const isEmbed = useIsEmbed(props.isEmbed);
+ const eventTypeListItemEmbedStyles = useEmbedStyles("eventTypeListItem");
+ const shouldAlignCentrallyInEmbed = useEmbedNonStylesConfig("align") !== "left";
+ const shouldAlignCentrally = !isEmbed || shouldAlignCentrallyInEmbed;
+ const {
+ // So it doesn't display in the Link (and make tests fail)
+ user: _user,
+ orgSlug: _orgSlug,
+ ...query
+ } = useRouterQuery();
+
+ /*
+ const telemetry = useTelemetry();
+ useEffect(() => {
+ if (top !== window) {
+ //page_view will be collected automatically by _middleware.ts
+ telemetry.event(telemetryEventTypes.embedView, collectPageParameters("/[user]"));
+ }
+ }, [telemetry, router.asPath]); */
- // One-part variant
- return (
-
-
- {iconLinks.map(({ type, url, name }, index) => (
-
- ))}
- {genericLinks.map(({ type, url, name }, index) => (
-
- ))}
+ if (entity?.isUnpublished) {
+ return (
+
+
-
- );
-};
-
-const ProfilePage = ({ profileData }) => {
- const { user } = useAuthContext();
- console.log({ profileData });
-
- const userPhoto = () => {
- if (profileData.avatar_url) return profileData.avatar_url;
- if (profileData.name) return `https://api.dicebear.com/6.x/initials/svg?seed=${profileData.name}`;
- return `https://api.dicebear.com/7.x/shapes/svg?seed=${profileData.uid}`;
- };
-
- const userPlainTextBio =
- profileData?.bio?.content?.length && profileData?.bio?.content[0]?.content
- ? profileData.bio.content[0].content.map((item) => item?.text ?? "").join("")
- : "";
-
- const isLoggedInUser = profileData?.uid === user?.uid;
+ );
+ }
+ const isEventListEmpty = eventTypes.length === 0;
return (
-
- {/* Profile header */}
-
+
- {/* {process.env.NODE_ENV === "production" ? "" : } */}
-
- {/* Top */}
-
-
-
-
- {profileData?.name}
-
- {profileData?.role && (
-
- {titleCase(profileData?.role)}
-
- )}
- {profileData?.company && (
-
-
at
-
{insertNonBreakingSpaces(profileData?.company)}
-
+
+
+
+
+
+
+ {profile.name}
+ {user.verified && (
+
+ )}
+
+ {!isBioEmpty && (
+ <>
+
+ >
)}
- {/* Button block */}
+
- {user?.uid ? (
- //
- {
- // NProgress.set(0.4);
- // try {
- // createCheckoutSession({
- // bookedByUid: user?.uid,
- // bookingByName: user?.displayName ?? null,
- // bookedByEmail: user?.email,
- // bookingWithUid: profileData?.uid,
- // bookingWithName: profileData?.name,
- // bookingWithEmail: profileData?.email,
- // bookingLink:
- // profileData?.calendar?.calcom_event_url ??
- // profileData?.calendar_link,
- // chargeAmount: profileData?.call_charges,
- // calUserId: profileData?.calendar?.calcom_user_id,
- // });
- // } catch (e) {
- // console.log(
- // "Error redirecting to Stripe payment page: ",
- // e
- // );
- // NProgress.done();
- // }
- // }}
- >
-
- Book a Call β
-
+ className={classNames("rounded-md ", !isEventListEmpty && "border-subtle border")}
+ data-testid="event-types">
+ {user.away ? (
+
+
+
π΄{" " + t("user_away")}
+
{t("user_away_description") as string}
+
+
) : (
- //
-
{
- // NProgress.set(0.4);
- // try {
- // const auth = getAuth();
- // signInAnonymously(auth)
- // .then(async (data) => {
- // const { user } = data;
- // if (user?.uid) {
- // try {
- // createCheckoutSession({
- // bookedByUid: user?.uid,
- // bookingByName: user?.displayName ?? null,
- // bookedByEmail: user?.email,
- // bookingWithUid: profileData?.uid,
- // bookingWithName: profileData?.name,
- // bookingWithEmail: profileData?.email,
- // bookingLink:
- // profileData?.calendar?.calcom_event_url ??
- // profileData?.calendar_link,
- // chargeAmount: profileData?.call_charges,
- // calUserId: profileData?.calendar?.calcom_user_id,
- // });
- // } catch (e) {
- // console.log(
- // "Error redirecting to Stripe payment page: ",
- // e
- // );
- // NProgress.done();
- // }
- // }
- // })
- // .catch((error) => {
- // toast.error(error.message);
- // console.log("error", error);
- // });
- // } catch (e) {
- // console.error(e);
- // }
- // }}
- >
-
- Book a Call β
-
+ eventTypes.map((type) => (
+
+
+ {/* Don't prefetch till the time we drop the amount of javascript in [user][type] page which is impacting score for [user] page */}
+
+
{
+ sdkActionManager?.fire("eventTypeSelected", {
+ eventType: type,
+ });
+ }}
+ data-testid="event-type-link">
+
+
{type.title}
+
+
+
+
+
+ ))
)}
-
-
${profileData?.call_charges}/hr
-
- {/* Links */}
- {profileData.links?.length > 0 &&
}
-
-
- {isLoggedInUser ? (
-
-
- {/* */}
- Edit profile
-
-
- ) : (
- ""
- )}
- {user?.email?.includes("hive.one") || user?.email?.includes("bord.id") ? (
-
- {
- const filename = "data.json";
- const jsonStr = JSON.stringify(profileData);
- const element = document.createElement("a");
- element.setAttribute(
- "href",
- "data:text/plain;charset=utf-8," + encodeURIComponent(jsonStr)
- );
- element.setAttribute("download", filename);
- element.style.display = "none";
- document.body.appendChild(element);
- element.click();
- document.body.removeChild(element);
- }}>
- Export profile
-
-
- ) : (
- ""
- )}
-
- {/* About */}
- {/* {profileData?.bio ? (
-
- ) : (
- ""
- )} */}
-
- {/* Gray section */}
-
-
- {/* Facts */}
- {profileData?.facts?.length > 0 && (
-
-
- {profileData?.facts.map(({ title, description, url }, index) => (
-
- ))}
-
-
- )}
- {/* Advise on */}
- {profileData?.advice_on?.length ? (
-
-
- {profileData?.advice_on?.map((title) => (
-
50}
- text={{title}
}
- key={title}>
-
- {title?.slice(0, 50)}
- {title?.length > 50 ? "..." : ""}
-
-
- ))}
-
-
- ) : (
- ""
- )}
-
-
-
-
+ {isEventListEmpty &&
}
+
+
- {/* Details */}
-
- {profileData?.projects?.length ? (
-
- {profileData?.projects?.map((project, index) => (
-
- ))}
-
- ) : (
- ""
- )}
- {profileData?.books?.length ? (
-
-
- {profileData?.books?.map((book, index) => (
-
- ))}
-
-
- ) : (
- ""
- )}
- {profileData?.podcast?.episodes?.length && (
-
- )}
- {profileData?.appearances && profileData.appearances.length > 0 && (
-
- )}
- {profileData?.videos?.length ? (
-
-
- {profileData?.videos?.map((video, index) => (
-
- ))}
-
-
- ) : (
- ""
- )}
- {profileData?.experience?.length ? (
-
- {profileData?.experience?.map((experience, index) => (
-
- ))}
-
- ) : (
- ""
- )}
- {profileData?.publications?.length > 0 && (
-
- {profileData?.publications?.map((publication, index) => (
-
- ))}
-
- )}
-
- {/*
*/}
-
+ >
);
+}
+
+UserPage.isBookingPage = true;
+UserPage.PageWrapper = PageWrapper;
+
+const getEventTypesWithHiddenFromDB = async (userId: number) => {
+ return (
+ await prisma.eventType.findMany({
+ where: {
+ AND: [
+ {
+ teamId: null,
+ },
+ {
+ OR: [
+ {
+ userId,
+ },
+ {
+ users: {
+ some: {
+ id: userId,
+ },
+ },
+ },
+ ],
+ },
+ ],
+ },
+ orderBy: [
+ {
+ position: "desc",
+ },
+ {
+ id: "asc",
+ },
+ ],
+ select: {
+ ...baseEventTypeSelect,
+ metadata: true,
+ },
+ })
+ ).map((eventType) => ({
+ ...eventType,
+ metadata: EventTypeMetaDataSchema.parse(eventType.metadata),
+ }));
};
-export async function getServerSideProps({ params, res }) {
- res.setHeader("Cache-Control", "public, s-maxage=10, stale-while-revalidate=59");
- const profileID = params.user;
- console.log("profileID", profileID);
- let profileData;
+export type UserPageProps = {
+ trpcState: DehydratedState;
+ profile: {
+ name: string;
+ image: string;
+ theme: string | null;
+ brandColor: string;
+ darkBrandColor: string;
+ organizationSlug: string | null;
+ allowSEOIndexing: boolean;
+ };
+ users: Pick
[];
+ themeBasis: string | null;
+ markdownStrippedBio: string;
+ safeBio: string;
+ entity: {
+ isUnpublished?: boolean;
+ orgSlug?: string | null;
+ name?: string | null;
+ };
+ eventTypes: ({
+ descriptionAsSafeHTML: string;
+ metadata: z.infer;
+ } & Pick<
+ EventType,
+ | "id"
+ | "title"
+ | "slug"
+ | "length"
+ | "hidden"
+ | "requiresConfirmation"
+ | "requiresBookerEmailVerification"
+ | "price"
+ | "currency"
+ | "recurringEvent"
+ >)[];
+} & EmbedProps;
+
+export const getServerSideProps: GetServerSideProps = async (context) => {
+ const ssr = await ssrInit(context);
+ const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(
+ context.req.headers.host ?? "",
+ context.params?.orgSlug
+ );
+ const usernameList = getUsernameList(context.query.user as string);
+ const dataFetchStart = Date.now();
+ const usersWithoutAvatar = await prisma.user.findMany({
+ where: {
+ username: {
+ in: usernameList,
+ },
+ organization: isValidOrgDomain && currentOrgDomain ? getSlugOrRequestedSlug(currentOrgDomain) : null,
+ },
+ select: {
+ id: true,
+ username: true,
+ email: true,
+ name: true,
+ bio: true,
+ brandColor: true,
+ darkBrandColor: true,
+ organizationId: true,
+ organization: {
+ select: {
+ slug: true,
+ name: true,
+ },
+ },
+ theme: true,
+ away: true,
+ verified: true,
+ allowDynamicBooking: true,
+ allowSEOIndexing: true,
+ },
+ });
- try {
- profileData = await getProfile(profileID);
- console.log("profileData", profileData);
- if (!profileData) {
- throw new Error("User not found"); // Throw an error if profileData is empty
- }
- } catch (e) {
- res.statusCode = 404; // Set the status code to 404
+ const isDynamicGroup = usersWithoutAvatar.length > 1;
+ if (isDynamicGroup) {
return {
- props: {
- profileID,
- profileData: null, // Set profileData to null
+ redirect: {
+ permanent: false,
+ destination: `/${usernameList.join("+")}/dynamic`,
},
+ } as {
+ redirect: {
+ permanent: false;
+ destination: string;
+ };
};
}
- return {
- props: {
- profileID,
- profileData: JSON.parse(JSON.stringify(profileData)),
- },
- };
-}
-
-ProfilePage.PageWrapper = PageWrapper;
-
-export default ProfilePage;
-
-// import type { DehydratedState } from "@tanstack/react-query";
-// import classNames from "classnames";
-// import type { GetServerSideProps, InferGetServerSidePropsType } from "next";
-// import Link from "next/link";
-// import { Toaster } from "react-hot-toast";
-// import type { z } from "zod";
-
-// import {
-// sdkActionManager,
-// useEmbedNonStylesConfig,
-// useEmbedStyles,
-// useIsEmbed,
-// } from "@calcom/embed-core/embed-iframe";
-// import OrganizationAvatar from "@calcom/features/ee/organizations/components/OrganizationAvatar";
-// import { getSlugOrRequestedSlug } from "@calcom/features/ee/organizations/lib/orgDomains";
-// import { orgDomainConfig } from "@calcom/features/ee/organizations/lib/orgDomains";
-// import { EventTypeDescriptionLazy as EventTypeDescription } from "@calcom/features/eventtypes/components";
-// import EmptyPage from "@calcom/features/eventtypes/components/EmptyPage";
-// import { getUsernameList } from "@calcom/lib/defaultEvents";
-// import { useLocale } from "@calcom/lib/hooks/useLocale";
-// import { useRouterQuery } from "@calcom/lib/hooks/useRouterQuery";
-// import useTheme from "@calcom/lib/hooks/useTheme";
-// import { markdownToSafeHTML } from "@calcom/lib/markdownToSafeHTML";
-// import { stripMarkdown } from "@calcom/lib/stripMarkdown";
-// import prisma from "@calcom/prisma";
-// import type { EventType, User } from "@calcom/prisma/client";
-// import { baseEventTypeSelect } from "@calcom/prisma/selects";
-// import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
-// import { HeadSeo, UnpublishedEntity } from "@calcom/ui";
-// import { Verified, ArrowRight } from "@calcom/ui/components/icon";
-
-// import type { EmbedProps } from "@lib/withEmbedSsr";
-
-// import { ssrInit } from "@server/lib/ssr";
-
-// export function UserPage(props: InferGetServerSidePropsType) {
-// const { users, profile, eventTypes, markdownStrippedBio, entity } = props;
-
-// const [user] = users; //To be used when we only have a single user, not dynamic group
-// useTheme(profile.theme);
-// const { t } = useLocale();
-
-// const isBioEmpty = !user.bio || !user.bio.replace("
", "").length;
-
-// const isEmbed = useIsEmbed(props.isEmbed);
-// const eventTypeListItemEmbedStyles = useEmbedStyles("eventTypeListItem");
-// const shouldAlignCentrallyInEmbed = useEmbedNonStylesConfig("align") !== "left";
-// const shouldAlignCentrally = !isEmbed || shouldAlignCentrallyInEmbed;
-// const {
-// // So it doesn't display in the Link (and make tests fail)
-// user: _user,
-// orgSlug: _orgSlug,
-// ...query
-// } = useRouterQuery();
-
-// /*
-// const telemetry = useTelemetry();
-// useEffect(() => {
-// if (top !== window) {
-// //page_view will be collected automatically by _middleware.ts
-// telemetry.event(telemetryEventTypes.embedView, collectPageParameters("/[user]"));
-// }
-// }, [telemetry, router.asPath]); */
-
-// if (entity?.isUnpublished) {
-// return (
-//
-//
-//
-// );
-// }
+ const users = usersWithoutAvatar.map((user) => ({
+ ...user,
+ avatar: `/${user.username}/avatar.png`,
+ }));
-// const isEventListEmpty = eventTypes.length === 0;
-// return (
-// <>
-//
-
-//
-//
-//
-//
-//
-// {profile.name}
-// {user.verified && (
-//
-// )}
-//
-// {!isBioEmpty && (
-// <>
-//
-// >
-// )}
-//
-
-//
-// {user.away ? (
-//
-//
-//
π΄{" " + t("user_away")}
-//
{t("user_away_description") as string}
-//
-//
-// ) : (
-// eventTypes.map((type) => (
-//
-//
-// {/* Don't prefetch till the time we drop the amount of javascript in [user][type] page which is impacting score for [user] page */}
-//
-//
{
-// sdkActionManager?.fire("eventTypeSelected", {
-// eventType: type,
-// });
-// }}
-// data-testid="event-type-link">
-//
-//
{type.title}
-//
-//
-//
-//
-//
-// ))
-// )}
-//
-
-// {isEventListEmpty && }
-//
-//
-//
-// >
-// );
-// }
-
-// UserPage.isBookingPage = true;
-// UserPage.PageWrapper = PageWrapper;
-
-// const getEventTypesWithHiddenFromDB = async (userId: number) => {
-// return (
-// await prisma.eventType.findMany({
-// where: {
-// AND: [
-// {
-// teamId: null,
-// },
-// {
-// OR: [
-// {
-// userId,
-// },
-// {
-// users: {
-// some: {
-// id: userId,
-// },
-// },
-// },
-// ],
-// },
-// ],
-// },
-// orderBy: [
-// {
-// position: "desc",
-// },
-// {
-// id: "asc",
-// },
-// ],
-// select: {
-// ...baseEventTypeSelect,
-// metadata: true,
-// },
-// })
-// ).map((eventType) => ({
-// ...eventType,
-// metadata: EventTypeMetaDataSchema.parse(eventType.metadata),
-// }));
-// };
-
-// export type UserPageProps = {
-// trpcState: DehydratedState;
-// profile: {
-// name: string;
-// image: string;
-// theme: string | null;
-// brandColor: string;
-// darkBrandColor: string;
-// organizationSlug: string | null;
-// allowSEOIndexing: boolean;
-// };
-// users: Pick[];
-// themeBasis: string | null;
-// markdownStrippedBio: string;
-// safeBio: string;
-// entity: {
-// isUnpublished?: boolean;
-// orgSlug?: string | null;
-// name?: string | null;
-// };
-// eventTypes: ({
-// descriptionAsSafeHTML: string;
-// metadata: z.infer;
-// } & Pick<
-// EventType,
-// | "id"
-// | "title"
-// | "slug"
-// | "length"
-// | "hidden"
-// | "requiresConfirmation"
-// | "requiresBookerEmailVerification"
-// | "price"
-// | "currency"
-// | "recurringEvent"
-// >)[];
-// } & EmbedProps;
-
-// export const getServerSideProps: GetServerSideProps = async (context) => {
-// const ssr = await ssrInit(context);
-// const { currentOrgDomain, isValidOrgDomain } = orgDomainConfig(
-// context.req.headers.host ?? "",
-// context.params?.orgSlug
-// );
-// const usernameList = getUsernameList(context.query.user as string);
-// const dataFetchStart = Date.now();
-// const usersWithoutAvatar = await prisma.user.findMany({
-// where: {
-// username: {
-// in: usernameList,
-// },
-// organization: isValidOrgDomain && currentOrgDomain ? getSlugOrRequestedSlug(currentOrgDomain) : null,
-// },
-// select: {
-// id: true,
-// username: true,
-// email: true,
-// name: true,
-// bio: true,
-// brandColor: true,
-// darkBrandColor: true,
-// organizationId: true,
-// organization: {
-// select: {
-// slug: true,
-// name: true,
-// },
-// },
-// theme: true,
-// away: true,
-// verified: true,
-// allowDynamicBooking: true,
-// allowSEOIndexing: true,
-// },
-// });
-
-// const isDynamicGroup = usersWithoutAvatar.length > 1;
-// if (isDynamicGroup) {
-// return {
-// redirect: {
-// permanent: false,
-// destination: `/${usernameList.join("+")}/dynamic`,
-// },
-// } as {
-// redirect: {
-// permanent: false;
-// destination: string;
-// };
-// };
-// }
-
-// const users = usersWithoutAvatar.map((user) => ({
-// ...user,
-// avatar: `/${user.username}/avatar.png`,
-// }));
-
-// if (!users.length || (!isValidOrgDomain && !users.some((user) => user.organizationId === null))) {
-// return {
-// notFound: true,
-// } as {
-// notFound: true;
-// };
-// }
+ if (!users.length || (!isValidOrgDomain && !users.some((user) => user.organizationId === null))) {
+ return {
+ notFound: true,
+ } as {
+ notFound: true;
+ };
+ }
-// const [user] = users; //to be used when dealing with single user, not dynamic group
+ const [user] = users; //to be used when dealing with single user, not dynamic group
-// const profile = {
-// name: user.name || user.username || "",
-// image: user.avatar,
-// theme: user.theme,
-// brandColor: user.brandColor,
-// darkBrandColor: user.darkBrandColor,
-// organizationSlug: user.organization?.slug ?? null,
-// allowSEOIndexing: user.allowSEOIndexing ?? true,
-// };
+ const profile = {
+ name: user.name || user.username || "",
+ image: user.avatar,
+ theme: user.theme,
+ brandColor: user.brandColor,
+ darkBrandColor: user.darkBrandColor,
+ organizationSlug: user.organization?.slug ?? null,
+ allowSEOIndexing: user.allowSEOIndexing ?? true,
+ };
-// const eventTypesWithHidden = await getEventTypesWithHiddenFromDB(user.id);
-// const dataFetchEnd = Date.now();
-// if (context.query.log === "1") {
-// context.res.setHeader("X-Data-Fetch-Time", `${dataFetchEnd - dataFetchStart}ms`);
-// }
-// const eventTypesRaw = eventTypesWithHidden.filter((evt) => !evt.hidden);
+ const eventTypesWithHidden = await getEventTypesWithHiddenFromDB(user.id);
+ const dataFetchEnd = Date.now();
+ if (context.query.log === "1") {
+ context.res.setHeader("X-Data-Fetch-Time", `${dataFetchEnd - dataFetchStart}ms`);
+ }
+ const eventTypesRaw = eventTypesWithHidden.filter((evt) => !evt.hidden);
-// const eventTypes = eventTypesRaw.map((eventType) => ({
-// ...eventType,
-// metadata: EventTypeMetaDataSchema.parse(eventType.metadata || {}),
-// descriptionAsSafeHTML: markdownToSafeHTML(eventType.description),
-// }));
+ const eventTypes = eventTypesRaw.map((eventType) => ({
+ ...eventType,
+ metadata: EventTypeMetaDataSchema.parse(eventType.metadata || {}),
+ descriptionAsSafeHTML: markdownToSafeHTML(eventType.description),
+ }));
-// const safeBio = markdownToSafeHTML(user.bio) || "";
+ const safeBio = markdownToSafeHTML(user.bio) || "";
-// const markdownStrippedBio = stripMarkdown(user?.bio || "");
-// const org = usersWithoutAvatar[0].organization;
+ const markdownStrippedBio = stripMarkdown(user?.bio || "");
+ const org = usersWithoutAvatar[0].organization;
-// return {
-// props: {
-// users: users.map((user) => ({
-// name: user.name,
-// username: user.username,
-// bio: user.bio,
-// away: user.away,
-// verified: user.verified,
-// })),
-// entity: {
-// isUnpublished: org?.slug === null,
-// orgSlug: currentOrgDomain,
-// name: org?.name ?? null,
-// },
-// eventTypes,
-// safeBio,
-// profile,
-// // Dynamic group has no theme preference right now. It uses system theme.
-// themeBasis: user.username,
-// trpcState: ssr.dehydrate(),
-// markdownStrippedBio,
-// },
-// };
-// };
+ return {
+ props: {
+ users: users.map((user) => ({
+ name: user.name,
+ username: user.username,
+ bio: user.bio,
+ away: user.away,
+ verified: user.verified,
+ })),
+ entity: {
+ isUnpublished: org?.slug === null,
+ orgSlug: currentOrgDomain,
+ name: org?.name ?? null,
+ },
+ eventTypes,
+ safeBio,
+ profile,
+ // Dynamic group has no theme preference right now. It uses system theme.
+ themeBasis: user.username,
+ trpcState: ssr.dehydrate(),
+ markdownStrippedBio,
+ },
+ };
+};
-// export default UserPage;
+export default UserPage;
diff --git a/apps/web/pages/_app.tsx b/apps/web/pages/_app.tsx
index b93ca8281..16c1cef90 100644
--- a/apps/web/pages/_app.tsx
+++ b/apps/web/pages/_app.tsx
@@ -1,4 +1,4 @@
-import { AuthContextProvider } from "context/AuthContext";
+import { AuthContextProvider } from "context/authContext";
import React from "react";
import { trpc } from "@calcom/trpc/react";
diff --git a/apps/web/pages/signup.tsx b/apps/web/pages/signup.tsx
index e1ba2af3d..776c8ccdf 100644
--- a/apps/web/pages/signup.tsx
+++ b/apps/web/pages/signup.tsx
@@ -79,14 +79,14 @@ export default function Signup({ prepopulateFormValues, token, orgSlug, orgAutoA
const signUp: SubmitHandler = async (data) => {
console.info("signup data", data);
- const { result, error } = firebaseSignUp(data?.email, data?.password);
- if (error) {
- if (error.code === "auth/email-already-in-use") alert("Email already in use π");
- if (error.code === "auth/weak-password") alert("Password should be at least 6 characters π");
- if (error.code === "auth/invalid-email") alert("Invalid email π");
+ const res: any = firebaseSignUp(data?.email, data?.password);
+ if (res?.error) {
+ if (res?.error.code === "auth/email-already-in-use") alert("Email already in use π");
+ if (res?.error.code === "auth/weak-password") alert("Password should be at least 6 characters π");
+ if (res?.error.code === "auth/invalid-email") alert("Invalid email π");
return;
}
- console.info({ result, error });
+ console.info({ res });
await fetch("/api/auth/signup", {
body: JSON.stringify({
diff --git a/apps/web/pages/ui/button.js b/apps/web/pages/ui/button.js
deleted file mode 100644
index 98f5a4f4e..000000000
--- a/apps/web/pages/ui/button.js
+++ /dev/null
@@ -1,92 +0,0 @@
-import clsx from "clsx";
-import Link from "next/link";
-
-export default function Button(props) {
- const { className, prefix, disabled, suffix, children, variant, onClick, as, href, active, target } = props;
-
- const makeButtonClass = ({ active, disabled } = {}) => {
- switch (variant) {
- case "link":
- return clsx(
- `text-gray-600 hover:text-black border-b border-transparent hover:border-gray-600 duration-100`,
- disabled ? "" : "",
- active ? "" : ""
- );
- case "rishi-primary":
- return clsx(
- `bg-gradient-to-br border-black from-white to-gray-200 text-black flex items-center justify-center rounded-lg px-3 py-1 border border-transparent duration-100 text-sm`,
- disabled ? "" : "",
- active ? "" : ""
- );
- case "primary":
- return clsx(
- `bg-primary text-[#9e802b] flex items-center justify-center rounded-lg px-3 py-1 border border-primary-dark/50 hover:border-primary-dark duration-100 text-sm`,
- disabled ? "" : "",
- active ? "" : ""
- );
- case "secondary":
- return clsx(
- `bg-white text-gray-600 flex items-center justify-center rounded-lg px-3 py-1 border border-gray-200 hover:border-gray-400 duration-100 text-sm`,
- disabled ? "" : "",
- active ? "" : ""
- );
- case "invisible":
- return clsx(
- `text-gray-600 flex items-center justify-center rounded-lg px-3 py-1 hover:text-primary-dark w-full duration-100 text-sm`,
- disabled ? "" : "",
- active ? "" : ""
- );
- case "ternary":
- return clsx(
- "py-[2.4px] px-3 flex items-center relative rounded-[7px] cursor-pointer",
- active
- ? "text-black border-gray-300 bg-gray-200/80"
- : "text-gray-600 border-transparent hover:text-gray-800 hover:bg-gray-200/50"
- );
- default:
- return ``;
- }
- };
-
- if (as === "a") {
- return (
-
- {prefix && prefix}
- {children}
- {suffix && suffix}
-
- );
- }
-
- if (as === "div") {
- return (
-
- {prefix && prefix}
- {children}
- {suffix && suffix}
-
- );
- }
-
- return (
-
- {prefix && prefix}
- {children}
- {suffix && suffix}
-
- );
-}
diff --git a/apps/web/pages/ui/container.js b/apps/web/pages/ui/container.js
deleted file mode 100644
index 6ab7a0e09..000000000
--- a/apps/web/pages/ui/container.js
+++ /dev/null
@@ -1,11 +0,0 @@
-import clsx from "clsx";
-
-const Container = ({ children, className, width }) => {
- return (
-
- );
-};
-
-export default Container;
diff --git a/apps/web/pages/ui/dialog.js b/apps/web/pages/ui/dialog.js
deleted file mode 100644
index a4074c29b..000000000
--- a/apps/web/pages/ui/dialog.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import { X } from "@phosphor-icons/react";
-import * as RadixDialog from "@radix-ui/react-dialog";
-
-const Dialog = ({ trigger, content, title, description, hideClose, ...props }) => (
-
- {trigger ?? ""}
-
-
-
- {hideClose ? (
- ""
- ) : (
-
-
-
-
-
- )}
- {title ? (
- {title}
- ) : (
- ""
- )}
- {description && (
-
- {description}
-
- )}
- {content ?? ""}
-
-
-
-);
-
-export default Dialog;
diff --git a/apps/web/pages/ui/dropdown.js b/apps/web/pages/ui/dropdown.js
deleted file mode 100644
index 0792a6f2c..000000000
--- a/apps/web/pages/ui/dropdown.js
+++ /dev/null
@@ -1,94 +0,0 @@
-"use client";
-
-import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
-import clsx from "clsx";
-import { motion } from "framer-motion";
-import Link from "next/link";
-
-const ITEM_CLASS =
- "focus:outline-none ring-1 ring-transparent focus:bg-white dark:focus:bg-gray-100 cursor-pointer flex items-center px-2 py-[5px] text-sm hover:bg-white hover:shadow-[0_1px_2px_rgba(0,0,0,0.15)] focus:shadow-[0_1px_3px_rgba(0,0,0,0.15)] dark:focus:shadow-[0_1px_2px_rgba(0,0,0,0.9)] dark:hover:shadow-[0_1px_2px_rgba(0,0,0,0.9)] dark:hover:bg-white dark:hover:text-gray-800 dark:text-gray-200 dark:focus:text-gray-800 rounded-lg mb-[2px]";
-
-const RenderItem = ({ item }) => {
- switch (item?.as) {
- case "divider":
- return ;
- case "a":
- return (
-
-
- {item?.icon ? {item?.icon} : ""}
- {item?.title}
-
-
- );
- default:
- return (
-
-
- {item?.icon ? {item?.icon} : ""}
- {item?.title}
-
-
- );
- }
-};
-
-const Dropdown = ({ trigger, side, align, items } = {}) => {
- return (
-
-
- {trigger}
-
-
-
-
-
- <>
-
-
- {items?.map((item, index) =>
- item?.hide ? "" :
- )}
- >
-
-
-
-
- );
-};
-
-export default Dropdown;
diff --git a/apps/web/pages/ui/fayaz/Button.js b/apps/web/pages/ui/fayaz/Button.js
deleted file mode 100644
index b0cde839f..000000000
--- a/apps/web/pages/ui/fayaz/Button.js
+++ /dev/null
@@ -1,42 +0,0 @@
-import clsx from "clsx";
-import React from "react";
-
-const Button = ({ label, icon, size, loading, color = "primary", className, ...props }) => {
- return (
-
- {loading && (
-
-
-
-
- )}
- {icon && {icon} }
- {label}
-
- );
-};
-
-export default Button;
diff --git a/apps/web/pages/ui/fayaz/PhotoUpload.js b/apps/web/pages/ui/fayaz/PhotoUpload.js
deleted file mode 100644
index 24fd17418..000000000
--- a/apps/web/pages/ui/fayaz/PhotoUpload.js
+++ /dev/null
@@ -1,57 +0,0 @@
-import { useState, useEffect } from "react";
-import { UserCircle } from "ui/icons/user";
-
-const PhotoUpload = (props) => {
- useEffect(() => {
- if (props.avatarUrl) {
- setImageUrl(props.avatarUrl);
- }
- }, [props.avatarUrl]);
-
- const [imageUrl, setImageUrl] = useState(null);
-
- async function handleFileChange(event) {
- const file = event.target.files[0];
- const blobUrl = await generateBlobUrl(file);
- setImageUrl(blobUrl);
- props.onPhotoChange(file);
- }
-
- function generateBlobUrl(file) {
- return new Promise((resolve) => {
- const reader = new FileReader();
- reader.onload = () => resolve(reader.result);
- reader.readAsDataURL(file);
- });
- }
-
- return (
-
-
- Photo
-
-
- {imageUrl ? (
-
- ) : (
-
-
-
- )}
-
-
document.getElementById("photo").click()}>
- {imageUrl ? "Change" : "Upload"}
-
-
-
- );
-};
-
-export default PhotoUpload;
diff --git a/apps/web/pages/ui/fayaz/RemoveButton.js b/apps/web/pages/ui/fayaz/RemoveButton.js
deleted file mode 100644
index a2608acd6..000000000
--- a/apps/web/pages/ui/fayaz/RemoveButton.js
+++ /dev/null
@@ -1,18 +0,0 @@
-import clsx from "clsx";
-import React from "react";
-
-const RemoveButton = ({ label, onClick, className }) => {
- return (
-
- {label}
-
- );
-};
-
-export default RemoveButton;
diff --git a/apps/web/pages/ui/fayaz/RichContentParser.js b/apps/web/pages/ui/fayaz/RichContentParser.js
deleted file mode 100644
index 4e595e20f..000000000
--- a/apps/web/pages/ui/fayaz/RichContentParser.js
+++ /dev/null
@@ -1,15 +0,0 @@
-import Link from "@tiptap/extension-link";
-import { EditorContent, useEditor } from "@tiptap/react";
-import StarterKit from "@tiptap/starter-kit";
-import React from "react";
-
-const RichContentParser = ({ content = "" }) => {
- const editor = useEditor({
- extensions: [StarterKit, Link.configure()],
- editable: false,
- content,
- });
- return ;
-};
-
-export default RichContentParser;
diff --git a/apps/web/pages/ui/fayaz/Select.js b/apps/web/pages/ui/fayaz/Select.js
deleted file mode 100644
index 7cfc84b98..000000000
--- a/apps/web/pages/ui/fayaz/Select.js
+++ /dev/null
@@ -1,21 +0,0 @@
-export default function Select({ label, id, name, options, defaultValue, ...props }) {
- return (
-
-
- {label}
-
-
- {options.map((option) => (
-
- {option.label}
-
- ))}
-
-
- );
-}
diff --git a/apps/web/pages/ui/fayaz/Textarea.js b/apps/web/pages/ui/fayaz/Textarea.js
deleted file mode 100644
index 9a18d6638..000000000
--- a/apps/web/pages/ui/fayaz/Textarea.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const Textarea = ({ id, label, name, helperText, ...props }) => {
- return (
- <>
-
- {label}
-
-
-
-
- {helperText}
- >
- );
-};
-
-export default Textarea;
diff --git a/apps/web/pages/ui/fayaz/input.js b/apps/web/pages/ui/fayaz/input.js
deleted file mode 100644
index 8bddd6d58..000000000
--- a/apps/web/pages/ui/fayaz/input.js
+++ /dev/null
@@ -1,44 +0,0 @@
-import clsx from "clsx";
-
-export default function Input({
- label,
- type = "text",
- id,
- name,
- placeholder,
- Icon,
- disabled,
- className,
- ...props
-}) {
- return (
-
- {label && (
-
- {label}
-
- )}
-
- {Icon && (
-
-
-
- )}
-
-
-
- );
-}
diff --git a/apps/web/pages/ui/icons/external-link-icon.js b/apps/web/pages/ui/icons/external-link-icon.js
deleted file mode 100644
index f9bddc506..000000000
--- a/apps/web/pages/ui/icons/external-link-icon.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import { cx } from "class-variance-authority";
-
-const ExternalLinkIcon = ({ weight = "normal", size = 8, className }) => {
- const lightIcon = (
-
-
-
- );
-
- const normalIcon = (
-
-
-
- );
-
- return (
-
-
{weight === "light" ? lightIcon : normalIcon}
-
- );
-};
-
-export default ExternalLinkIcon;
diff --git a/apps/web/pages/ui/icons/social.js b/apps/web/pages/ui/icons/social.js
deleted file mode 100644
index 57ede786e..000000000
--- a/apps/web/pages/ui/icons/social.js
+++ /dev/null
@@ -1,51 +0,0 @@
-// ==============================================================
-// IMPORTANT
-// Please make sure to maintain the same interface for all icons:
-// - `size` (default: 8)
-// - `className` (default: "")
-// - `color` (default: "none")
-//
-// It conforms to the `react-bootstrap-icons` interface.
-//
-// Also remember to:
-// - map size to the `width` and `height` attributes,
-// - map `className` to the `className` attribute,
-// - map `color` to the `fill` attribute.
-// ==============================================================
-
-// TODO: switch to react-simple-icons for social and company icons
-
-export const Keybase = ({ size = 8, className, color = "none" }) => {
- return (
-
-
-
- );
-};
-
-// From Simple Icons: https://simpleicons.org/
-export const GoogleScholar = ({ size = 8, className, color = "none" }) => {
- return (
-
-
-
- );
-};
diff --git a/apps/web/pages/ui/icons/user.js b/apps/web/pages/ui/icons/user.js
deleted file mode 100644
index 649f29094..000000000
--- a/apps/web/pages/ui/icons/user.js
+++ /dev/null
@@ -1,12 +0,0 @@
-export function UserCircle(props) {
- return (
-
-
-
- );
-}
diff --git a/apps/web/pages/ui/index.js b/apps/web/pages/ui/index.js
deleted file mode 100644
index 35dea2395..000000000
--- a/apps/web/pages/ui/index.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import Button from "./button";
-import Container from "./container";
-import Dialog from "./dialog";
-import Dropdown from "./dropdown";
-import Input from "./input";
-import Popover from "./popover";
-import TextHighlight from "./textHighlight";
-import Textarea from "./textarea";
-import Toast from "./toast";
-import Tooltip from "./tooltip";
-
-export { Dropdown, Button, Textarea, Input, Toast, Tooltip, Dialog, Container, TextHighlight, Popover };
diff --git a/apps/web/pages/ui/input.js b/apps/web/pages/ui/input.js
deleted file mode 100644
index 1e8f268a0..000000000
--- a/apps/web/pages/ui/input.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import clsx from "clsx";
-
-export default function Input(props) {
- return (
-
- {props?.label ? (
-
{props?.label}
- ) : (
- ""
- )}
-
{
- if (props.passref) {
- props.passref.current = el;
- }
- }}
- />
- {props.error && (
-
-
- {props.error}
-
- )}
-
- );
-}
diff --git a/apps/web/pages/ui/popover.js b/apps/web/pages/ui/popover.js
deleted file mode 100644
index b1f8925a6..000000000
--- a/apps/web/pages/ui/popover.js
+++ /dev/null
@@ -1,19 +0,0 @@
-"use client";
-
-import * as RadixPopover from "@radix-ui/react-popover";
-
-const Popover = ({ trigger, content }) => (
-
- {trigger ?? ""}
-
-
-
- {content ?? ""}
-
-
-
-
-
-);
-
-export default Popover;
diff --git a/apps/web/pages/ui/rishi/appearances.js b/apps/web/pages/ui/rishi/appearances.js
deleted file mode 100644
index 79255b98a..000000000
--- a/apps/web/pages/ui/rishi/appearances.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import { ArrowSquareOut } from "@phosphor-icons/react";
-import { Button } from "ui";
-
-const Appearances = ({ data }) => {
- const count = data?.length;
- if (!count) {
- return ``;
- }
-
- return (
-
-
Top Mentions & Appearances
-
- {data?.slice(0, 5)?.map((item) =>
- item?.url ? (
-
-
- {item?.image ? (
-
- ) : (
-
- {new URL(item?.url)?.hostname?.replace("www.", "")?.slice(0, 1)}
-
- )}
-
-
-
{item?.title}
-
-
- {new URL(item?.url)?.hostname?.slice(0, 20)?.replace("www.", "")}
- {new URL(item?.url)?.hostname?.length > 20 ? "..." : ""}
-
-
-
-
-
- ) : (
- ""
- )
- )}
-
- {/* {count > 5 ? (
-
- View all β
-
- ) : (
- ""
- )} */}
-
- );
-};
-
-export default Appearances;
diff --git a/apps/web/pages/ui/rishi/experience.js b/apps/web/pages/ui/rishi/experience.js
deleted file mode 100644
index a516f03a5..000000000
--- a/apps/web/pages/ui/rishi/experience.js
+++ /dev/null
@@ -1,69 +0,0 @@
-import { ArrowSquareOut } from "@phosphor-icons/react";
-import { Button } from "ui";
-
-const Experience = ({ data }) => {
- const count = data?.length;
- if (!count) {
- return ``;
- }
-
- return (
-
-
Experience
-
-
- {data?.map((item, index) => (
-
-
-
-
{item?.company}
- {item?.url ? (
-
-
- {new URL(item?.url)?.hostname?.replaceAll("www.", "")?.slice(0, 17)}
- {new URL(item?.url)?.hostname?.length > 17 ? "..." : ""}
-
-
-
- ) : (
- ""
- )}
-
-
-
- {item?.roles?.length ? (
-
- {item?.roles?.map((role) => (
-
-
-
-
- {role?.position}
-
-
-
- {role?.start_date} - {role?.end_date}
-
-
-
-
{role?.description}
-
- ))}
-
- ) : (
- ""
- )}
-
-
- ))}
-
-
- );
-};
-
-export default Experience;
diff --git a/apps/web/pages/ui/rishi/highlights.js b/apps/web/pages/ui/rishi/highlights.js
deleted file mode 100644
index b52eace70..000000000
--- a/apps/web/pages/ui/rishi/highlights.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import { TextHighlight } from "ui";
-
-const textHighlightClass = "!bg-black text-white rounded-md border-none ";
-const HIGHLIGHTS_LIST = [
- {
- text: (
-
- $2.3k MRR from SaaS projects
-
- ),
- icon: <>>,
- },
- {
- text: (
-
- #2 Product
- of the Day on ProductHunt
-
- ),
- icon: <>>,
- },
- {
- text: (
-
- Expertise in Next.js, TailwindCSS,
- Supabase etc.
-
- ),
- icon: <>>,
- },
-];
-
-const Highlights = () => {
- return (
-
-
Profile Highlights
-
- {HIGHLIGHTS_LIST?.map((item) => (
-
- {item?.text}
-
- ))}
-
-
- );
-};
-
-export default Highlights;
diff --git a/apps/web/pages/ui/rishi/index.js b/apps/web/pages/ui/rishi/index.js
deleted file mode 100644
index cdd7cb0c6..000000000
--- a/apps/web/pages/ui/rishi/index.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import Appearances from "./appearances";
-import Experience from "./experience";
-import Highlights from "./highlights";
-import Investments from "./investments";
-import UserLanguages from "./languages";
-import ProductsBuilt from "./productsBuilt";
-import ProfileHeader from "./profileHeader";
-import Sidebar from "./sidebar";
-import SidebarWrapper from "./sidebarWrapper";
-import SocialLinks from "./socialLinks";
-import ThingsICanAdviseOn from "./thingsICanAdviseOn";
-import UserRatings from "./userRatings";
-
-export {
- UserRatings,
- Investments,
- Appearances,
- ProductsBuilt,
- ThingsICanAdviseOn,
- SocialLinks,
- Experience,
- Highlights,
- UserLanguages,
- SidebarWrapper,
- ProfileHeader,
- Sidebar,
-};
diff --git a/apps/web/pages/ui/rishi/investments.js b/apps/web/pages/ui/rishi/investments.js
deleted file mode 100644
index ef677885f..000000000
--- a/apps/web/pages/ui/rishi/investments.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Button, TextHighlight } from "ui";
-
-const Investments = ({ data, userData }) => {
- const count = data?.length + 10;
- if (!count) {
- return ``;
- }
-
- return (
-
-
Investments
-
- {userData?.name || "Placeholder Name"} has{" "}
- invested in {count} companies . His last investment was in 2021. His{" "}
- biggest investment was $100M in Stripe .
-
-
-
- {data?.slice(0, 5)?.map((item) => (
-
-
-
{item?.organization}
-
- ))}
- {count > 5 ? (
-
View all β
- ) : (
- ""
- )}
-
-
- );
-};
-
-export default Investments;
diff --git a/apps/web/pages/ui/rishi/languages.js b/apps/web/pages/ui/rishi/languages.js
deleted file mode 100644
index 6836a8c9a..000000000
--- a/apps/web/pages/ui/rishi/languages.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const UserLanguages = ({ data }) => {
- return (
-
-
Languages I know
-
- {data?.length ? (
-
- {data?.map((item, index) => (
-
- {item}
- {index != data?.length - 1 ? , : ""}
-
- ))}
-
- ) : (
- "English, Hindi, German"
- )}
-
-
- );
-};
-
-export default UserLanguages;
diff --git a/apps/web/pages/ui/rishi/productsBuilt.js b/apps/web/pages/ui/rishi/productsBuilt.js
deleted file mode 100644
index e37bc87a2..000000000
--- a/apps/web/pages/ui/rishi/productsBuilt.js
+++ /dev/null
@@ -1,40 +0,0 @@
-import { ArrowSquareOut } from "@phosphor-icons/react";
-import { Button, TextHighlight } from "ui";
-
-const ProductsBuilt = ({ data }) => {
- const count = data?.projects?.length;
- if (!count) {
- return ``;
- }
-
- return (
-
-
Projects
-
- {data?.name} has founded {count} projects
-
-
- {data?.projects?.map((item) => (
-
- {item?.logo ? (
-
-
-
- ) : (
- ""
- )}
-
-
- {item?.title}
-
-
-
{item?.tagline}
-
-
- ))}
-
-
- );
-};
-
-export default ProductsBuilt;
diff --git a/apps/web/pages/ui/rishi/profileHeader.js b/apps/web/pages/ui/rishi/profileHeader.js
deleted file mode 100644
index 4374703b9..000000000
--- a/apps/web/pages/ui/rishi/profileHeader.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const ProfileHeader = ({ name, photo, introText }) => {
- return (
-
- {photo ? (
-
-
-
- ) : (
-
- {name?.slice(0, 1)}
-
- )}
- {name ?
{name} : ""}
- {introText ?
{introText}
: ""}
-
- );
-};
-
-export default ProfileHeader;
diff --git a/apps/web/pages/ui/rishi/sidebar.js b/apps/web/pages/ui/rishi/sidebar.js
deleted file mode 100644
index e1a14da07..000000000
--- a/apps/web/pages/ui/rishi/sidebar.js
+++ /dev/null
@@ -1,23 +0,0 @@
-import { CalendarPlus } from "@phosphor-icons/react";
-import { Button } from "ui";
-import { UserRatings, UserLanguages, SidebarWrapper } from "ui/rishi";
-
-const Sidebar = ({ languages, callLink, callRate, userRating }) => (
-
-
-
-
-
-
- Book a call with me
-
- ${callRate || "200"}/hr
-
-
-);
-
-export default Sidebar;
diff --git a/apps/web/pages/ui/rishi/sidebarWrapper.js b/apps/web/pages/ui/rishi/sidebarWrapper.js
deleted file mode 100644
index dd8a681d6..000000000
--- a/apps/web/pages/ui/rishi/sidebarWrapper.js
+++ /dev/null
@@ -1,7 +0,0 @@
-const SidebarWrapper = ({ children }) => (
-
-);
-
-export default SidebarWrapper;
diff --git a/apps/web/pages/ui/rishi/socialLinks.js b/apps/web/pages/ui/rishi/socialLinks.js
deleted file mode 100644
index 773ef1b6a..000000000
--- a/apps/web/pages/ui/rishi/socialLinks.js
+++ /dev/null
@@ -1,60 +0,0 @@
-import {
- Link as LinkIcon,
- At,
- TwitterLogo,
- GithubLogo,
- Rss,
- LinkedinLogo,
- YoutubeLogo,
-} from "@phosphor-icons/react";
-import { cleanLink } from "lib/utils";
-import { Button } from "ui";
-
-const getIcon = ({ forId }) => {
- switch (forId) {
- case "website":
- return ;
- case "email":
- return ;
- case "twitter":
- return ;
- case "github":
- return ;
- case "linkedin":
- return ;
- case "rss":
- return ;
- case "youtube":
- return ;
- default:
- return ;
- }
-};
-
-const SocialLinks = ({ data }) => {
- return (
-
-
Social Links
-
- {Object.values(data)?.map(({ key, url }) =>
- url ? (
-
- {getIcon({ forId: key })}
- {cleanLink(url)}
-
- ) : (
- ""
- )
- )}
-
-
- );
-};
-
-export default SocialLinks;
diff --git a/apps/web/pages/ui/rishi/thingsICanAdviseOn.js b/apps/web/pages/ui/rishi/thingsICanAdviseOn.js
deleted file mode 100644
index 2ff18665f..000000000
--- a/apps/web/pages/ui/rishi/thingsICanAdviseOn.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const ThingsICanAdviseOn = ({ data }) => {
- const count = data?.length;
- if (!count) {
- return ``;
- }
-
- return (
-
-
Things I can advice you on
-
-
- {data?.map((item) => (
- {item}
- ))}
-
-
-
- );
-};
-
-export default ThingsICanAdviseOn;
diff --git a/apps/web/pages/ui/rishi/userRatings.js b/apps/web/pages/ui/rishi/userRatings.js
deleted file mode 100644
index d6901fc7b..000000000
--- a/apps/web/pages/ui/rishi/userRatings.js
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Star } from "@phosphor-icons/react";
-
-const UserRatings = ({ rating }) => {
- return (
-
-
Reviews based on past bookings
-
-
-
-
-
-
-
{rating || "4"} stars
-
-
- );
-};
-
-export default UserRatings;
diff --git a/apps/web/pages/ui/spinner.js b/apps/web/pages/ui/spinner.js
deleted file mode 100644
index de2c4c618..000000000
--- a/apps/web/pages/ui/spinner.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const spinner = ({ label }) => {
- return (
-
-
-
-
-
- {label &&
{label}
}
-
- );
-};
-
-export default spinner;
diff --git a/apps/web/pages/ui/textHighlight.js b/apps/web/pages/ui/textHighlight.js
deleted file mode 100644
index cda63cb76..000000000
--- a/apps/web/pages/ui/textHighlight.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import clsx from "clsx";
-
-const TextHighlight = ({ children, className }) => {
- return (
-
- {children}
-
- );
-};
-
-export default TextHighlight;
diff --git a/apps/web/pages/ui/textarea.js b/apps/web/pages/ui/textarea.js
deleted file mode 100644
index a004a6437..000000000
--- a/apps/web/pages/ui/textarea.js
+++ /dev/null
@@ -1,27 +0,0 @@
-const Textarea = (props) => {
- return (
-
- {props?.label ? (
-
{props?.label}
- ) : (
- ""
- )}
-
- {props.error && (
-
-
- {props.error}
-
- )}
-
- );
-};
-
-export default Textarea;
diff --git a/apps/web/pages/ui/toast.js b/apps/web/pages/ui/toast.js
deleted file mode 100644
index 0a5654ac2..000000000
--- a/apps/web/pages/ui/toast.js
+++ /dev/null
@@ -1,74 +0,0 @@
-import { X } from "@phosphor-icons/react";
-import * as RadixToast from "@radix-ui/react-toast";
-import { motion } from "framer-motion";
-import * as React from "react";
-
-const Toast = ({ trigger, title, description, action, swipeDirection, duration }) => {
- const [open, setOpen] = React.useState(false);
- const eventDateRef = React.useRef(new Date());
- const timerRef = React.useRef(0);
-
- React.useEffect(() => {
- return () => clearTimeout(timerRef.current);
- }, []);
-
- return (
-
-
- {
- setOpen(false);
- window.clearTimeout(timerRef.current);
- timerRef.current = window.setTimeout(() => {
- eventDateRef.current = oneWeekAway();
- setOpen(true);
- }, 100);
- }}>
- {trigger ?? ""}
-
-
-
-
-
-
- {title ? {title} : ""}
- {description ? (
- {description}
- ) : (
- ""
- )}
- {action ? (
-
- {action}
-
- ) : (
- ""
- )}
-
-
-
-
-
-
-
-
-
-
-
-
- );
-};
-
-function oneWeekAway() {
- const now = new Date();
- const inOneWeek = now.setDate(now.getDate() + 7);
- return new Date(inOneWeek);
-}
-
-export default Toast;
diff --git a/apps/web/pages/ui/tooltip.js b/apps/web/pages/ui/tooltip.js
deleted file mode 100644
index 91c0ccca0..000000000
--- a/apps/web/pages/ui/tooltip.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import * as RadixTooltip from "@radix-ui/react-tooltip";
-import clsx from "clsx";
-import { motion } from "framer-motion";
-
-const Tooltip = ({
- children,
- text,
- delay,
- align,
- side,
- hasShortcut,
- triggerClass,
- noSpacing,
- sideOffset,
- alignOffset,
- show = true,
-} = {}) => (
-
-
-
- {children}
-
-
- {show ? (
-
-
- <>
-
- {text}
- {hasShortcut ? (
-
- {hasShortcut}
-
- ) : (
- ""
- )}
- {/* */}
-
- >
-
-
- ) : (
- ""
- )}
-
-
-);
-
-export default Tooltip;
diff --git a/apps/web/pages/ui/utilities/insert-non-breaking-spaces.js b/apps/web/pages/ui/utilities/insert-non-breaking-spaces.js
deleted file mode 100644
index 7cff4c4e9..000000000
--- a/apps/web/pages/ui/utilities/insert-non-breaking-spaces.js
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * Insert non-breaking spaces after small words in a string.
- *
- * @param {string} text - The string to insert non-breaking spaces into.
- * @returns {string} The string with non-breaking spaces inserted.
- */
-const insertNonBreakingSpaces = (text) => {
- // Define the small words and articles.
- const smallWords = [
- "a",
- "an",
- "the",
- "and",
- "or",
- "but",
- "of",
- "with",
- "at",
- "from",
- "into",
- "during",
- "including",
- "until",
- "against",
- "among",
- "throughout",
- "despite",
- "towards",
- "upon",
- "concerning",
- "to",
- "in",
- "for",
- "on",
- "by",
- "about",
- "like",
- "through",
- "over",
- "before",
- "between",
- "after",
- "since",
- "without",
- "under",
- "within",
- "along",
- "following",
- "across",
- "behind",
- "beyond",
- "plus",
- "except",
- "but",
- "up",
- "out",
- "around",
- "down",
- "off",
- "above",
- "near",
- ];
-
- // Create a regular expression from the small words array.
- const regex = new RegExp(`\\b(${smallWords.join("|")})\\s`, "gi");
-
- // Replace the space after the small words with a non-breaking space.
- return text.replace(regex, (match) => `${match.trim()}\u00A0`);
-};
-
-export default insertNonBreakingSpaces;
diff --git a/apps/web/pages/ui/valery/bio-link.js b/apps/web/pages/ui/valery/bio-link.js
deleted file mode 100644
index 476bd5302..000000000
--- a/apps/web/pages/ui/valery/bio-link.js
+++ /dev/null
@@ -1,140 +0,0 @@
-import Link from "next/link";
-import {
- Facebook,
- Github,
- Instagram,
- Link45deg,
- Linkedin,
- Mastodon,
- Medium,
- Quora,
- Reddit,
- StackOverflow,
- Telegram,
- Twitch,
- Twitter,
- Youtube,
- Wikipedia,
-} from "react-bootstrap-icons";
-
-import { Keybase, GoogleScholar } from "../../ui/icons/social";
-
-const linkTypes = [
- {
- type: "generic_link",
- label: "Custom",
- icon: Link45deg,
- },
- {
- type: "twitter",
- label: "Twitter",
- icon: Twitter,
- },
- {
- type: "linkedin",
- label: "LinkedIn",
- icon: Linkedin,
- },
- {
- type: "github",
- label: "GitHub",
- icon: Github,
- },
- {
- type: "stackexchange",
- label: "Stack Exchange",
- icon: StackOverflow,
- },
- { type: "wikipedia", label: "Wikipedia", icon: Wikipedia },
- {
- type: "google-scholar",
- label: "Google scholar",
- icon: GoogleScholar,
- },
- {
- type: "youtube",
- label: "YouTube",
- icon: Youtube,
- },
- {
- type: "facebook",
- label: "Facebook",
- icon: Facebook,
- },
- {
- type: "instagram",
- label: "Instagram",
- icon: Instagram,
- },
- {
- type: "medium",
- label: "Medium",
- icon: Medium,
- },
- {
- type: "quora",
- label: "Quora",
- icon: Quora,
- },
- {
- type: "reddit",
- label: "Reddit",
- icon: Reddit,
- },
- {
- type: "twitch",
- label: "Twitch",
- icon: Twitch,
- },
- {
- type: "telegram",
- label: "Telegram",
- icon: Telegram,
- },
- {
- type: "mastodon",
- label: "Mastodon",
- icon: Mastodon,
- },
- {
- type: "keybase",
- label: "Keybase",
- icon: Keybase,
- },
-];
-
-// Strip protocol from URL
-const stripProtocol = (url) => url.replace(/(^\w+:|^)\/\//, "");
-
-// Link type to icon mapping
-
-const iconProps = {
- size: 16,
- className: "shrink-0 text-gray-400 group-hover:text-gray-500",
-};
-
-const linkTypeToIcon = (type) => {
- const IconComponent = linkTypes.find((link) => link.type === type)?.icon;
- return IconComponent ? : null;
-};
-
-// TODO: Add tooltip for icon links
-const BioLink = ({ type, url, name }) => (
-
-
- {linkTypeToIcon(type) ?? }
-
- {(type === "generic_link" || type === "website") && (
-
- {name ? name : stripProtocol(url)}
-
- )}
-
-);
-
-export default BioLink;
diff --git a/apps/web/pages/ui/valery/book-item.js b/apps/web/pages/ui/valery/book-item.js
deleted file mode 100644
index c7de55fc6..000000000
--- a/apps/web/pages/ui/valery/book-item.js
+++ /dev/null
@@ -1,94 +0,0 @@
-import { cx } from "class-variance-authority";
-import clsx from "clsx";
-import Link from "next/link";
-import PropTypes from "prop-types";
-import { useEffect, useState } from "react";
-
-function BookItem({ book, className }) {
- const [details, setDetails] = useState({ title: "", coverImage: "" });
-
- useEffect(() => {
- if (book?.isbn) {
- getBookDetails(book?.isbn);
- }
- }, [book]);
-
- if (!book?.isbn) {
- return ``;
- }
-
- const getBookDetails = async (isbn) => {
- isbn = isbn || "9781451648546";
- const url = "https://www.googleapis.com/books/v1/volumes?q=isbn:" + isbn;
- const response = await fetch(url).then((response) => response.json());
- if (response?.items?.length) {
- setDetails(response?.items[0]);
- }
- };
-
- return (
-
-
-
- {/* Black shadow div masked by image */}
-
- {/* Cover image */}
- {details?.volumeInfo?.imageLinks?.thumbnail ? (
-
- ) : (
- // Placeholder
-
-
- {details?.volumeInfo?.title}
-
-
- )}
- {/* Cover shading */}
-
-
-
- {details?.volumeInfo?.title}
-
-
-
- );
-}
-
-BookItem.propTypes = {
- className: PropTypes.string,
-};
-
-BookItem.defaultProps = {
- className: "",
-};
-
-export default BookItem;
diff --git a/apps/web/pages/ui/valery/circles-background.js b/apps/web/pages/ui/valery/circles-background.js
deleted file mode 100644
index 76799cf3f..000000000
--- a/apps/web/pages/ui/valery/circles-background.js
+++ /dev/null
@@ -1,53 +0,0 @@
-import { useRef, useEffect } from "react";
-
-const CirclesBackground = ({ className }) => {
- const numCircles = 80; // number of circles
- const maxRadius = 3000; // maximum radius (half of viewBox dimension)
- // const opacityStep = 1 / numCircles; // each circle will be this much more opaque than the last
-
- const circles = [];
- const svgRef = useRef(null); // reference to the SVG
-
- for (let i = 0; i < numCircles; i++) {
- const radius = (i + 1) * (maxRadius / numCircles); // radius grows by a constant step
- const opacity = Math.sqrt((i + 1) / numCircles) / 1.5; // square root function for opacity
-
- // const opacity = Math.cbrt((i + 1) / numCircles); // Cubic root function for opacity
-
- circles.push(
-
- );
- }
-
- useEffect(() => {
- if (svgRef.current) {
- // const strokeWidth = 0.5 / window.devicePixelRatio;
- const strokeWidth = 1;
- const circles = svgRef.current.querySelectorAll("circle");
- circles.forEach((circle) => circle.setAttribute("stroke-width", strokeWidth));
- }
- }, []);
-
- return (
-
- {circles}
-
- );
-};
-
-export default CirclesBackground;
diff --git a/apps/web/pages/ui/valery/experience-item.js b/apps/web/pages/ui/valery/experience-item.js
deleted file mode 100644
index 954bb9934..000000000
--- a/apps/web/pages/ui/valery/experience-item.js
+++ /dev/null
@@ -1,61 +0,0 @@
-import { cx } from "class-variance-authority";
-import React from "react";
-
-function formatDate(inputDate) {
- if (!inputDate) return;
- const [year, month] = inputDate.split("-");
- const date = new Date(year, month - 1);
- const options = { month: "short", year: "numeric" };
- const formattedDate = new Intl.DateTimeFormat("en-US", options).format(date);
- return formattedDate;
-}
-
-function ExperienceItem({ experience, className }) {
- // If there are multiple roles, show them in a list with dots
- // If there is only one role, show it as a single line with no dots and indentation
- let rolesRender;
- if (experience.roles?.length > 1) {
- rolesRender = experience.roles.map((role, index) => (
-
-
-
-
{role.title}
-
- {formatDate(role.start_date)} β{" "}
- {role.end_date === "Present" ? "Present" : formatDate(role.end_date)}
-
-
-
- ));
- } else if (experience.roles?.length === 1) {
- const role = experience.roles[0];
- rolesRender = (
-
-
{role.title}
-
- {formatDate(role.start_date)} β{" "}
- {role.end_date === "Present" ? "Present" : formatDate(role.end_date)}
-
-
- );
- } else {
- rolesRender = "";
- }
-
- return (
-
-
{experience.company}
-
{rolesRender}
-
- );
-}
-
-export default ExperienceItem;
diff --git a/apps/web/pages/ui/valery/fact-item.js b/apps/web/pages/ui/valery/fact-item.js
deleted file mode 100644
index 5b57c37c0..000000000
--- a/apps/web/pages/ui/valery/fact-item.js
+++ /dev/null
@@ -1,38 +0,0 @@
-import { cx } from "class-variance-authority";
-import Link from "next/link";
-
-import ExternalLinkIcon from "../../ui/icons/external-link-icon";
-
-const FactItem = ({ title, description, url }) => {
- // Check if there is a link
- const isLink = url !== undefined && url !== null && url !== "";
-
- const containerClasses = cx(
- "col-span-1 flex h-48 flex-col justify-between rounded-lg bg-white px-5 py-4 text-gray-600 transition-all",
- isLink && "hover:shadow-lg active:shadow-md active:bg-gray-50"
- );
-
- const tileContent = (
- <>
-
-
{title}
- {/* Only show external link icon when there's a link */}
- {isLink &&
}
-
- {description}
- >
- );
-
- // If there is a link, wrap the tile content in a link
- if (isLink) {
- return (
-
- {tileContent}
-
- );
- } else {
- return {tileContent}
;
- }
-};
-
-export default FactItem;
diff --git a/apps/web/pages/ui/valery/mockup-data.js b/apps/web/pages/ui/valery/mockup-data.js
deleted file mode 100644
index e84278a44..000000000
--- a/apps/web/pages/ui/valery/mockup-data.js
+++ /dev/null
@@ -1,255 +0,0 @@
-import Link from "next/link";
-
-export const ABOUT = {
- name: "Jean-Gabriel Young",
- email: "jean-gabriel.young@uvm.edu",
- role: "Assistant Professor",
- company: "Department of Mathematics and Statistics, The University of Vermont",
- avatar_url: "https://www.jgyoung.ca/img/jgyoung.png",
- call_charges: "300",
- links: [
- {
- type: "twitter_url",
- href: "http://www.twitter.com/_jgyou",
- name: "Twitter",
- },
- {
- type: "generic_url",
- href: "https://arxiv.org/a/young_j_1.html",
- name: "arXiv.org",
- },
- {
- type: "generic_url",
- href: "https://scholar.google.ca/citations?user=qmKcNSoAAAAJ&hl=en",
- name: "Google Scholar",
- },
- {
- type: "generic_url",
- href: "https://www.researchgate.net/profile/Jean_Gabriel_Young",
- name: "ResearchGate",
- },
- {
- type: "generic_url",
- href: "https://impactstory.org/u/0000-0002-4464-2692",
- name: "Impactstory",
- },
- {
- type: "generic_url",
- href: "http://orcid.org/0000-0002-4464-2692",
- name: "ORCID",
- },
- { type: "github_url", href: "https://github.com/jg-you/", name: "" },
- {
- type: "stackexchange_url",
- href: "http://stackexchange.com/users/2079477/jgyou?tab=accounts",
- name: "",
- },
- {
- type: "generic_url",
- href: "https://www.webofscience.com/wos/author/record/1689626",
- name: "Web of Science",
- },
- {
- type: "generic_url",
- href: "https://aur.archlinux.org/account/jg-you/",
- name: "AUR",
- },
- {
- type: "linkedin_url",
- href: "https://www.linkedin.com/in/jean-gabriel-young-69857759/",
- name: "",
- },
- ],
-};
-
-export const BIO = (
- <>
-
- Dr. Jean-Gabriel Young is an Assistant Professor of Mathematics and Statistics at The University of
- Vermont and a data science advisor for Hive.one. Before that, he
- was a James S. McDonnell Foundation Fellow at the{" "}
-
- University of Michigan's Center for the Study of Complex Systems
-
- , mentored by Prof. Mark Newman. He has been
- working for 10+ year at the intersection of data science, network science, and complex systems.
-
- Here's what I can advise on:
-
- Network science
- Complex systems
- Bayesian data analysis
- Statistical inference
- Research and academia
- Academics in tech
-
-
- I'm excited to meet you and help you on your journey, whether it's understanding the basics of
- data science or discussing the latest trends network science in graph learning. Let's chat!
-
- >
-);
-
-export const FACTS = [
- {
- title: "JSMF fellow",
- description: "Understanding Dynamic & Multi-Scale Systems program",
- href: "#",
- },
- {
- title: "Published in Nature Physics, Science Advances, Physics Reports",
- description: "And 100+ publication in other journals",
- href: "#",
- },
- {
- title: "12 years in network science",
- description: "Collaborating with researchers from 7 countries",
- href: "",
- },
- {
- title: "Industry collaboration",
- description: "Working with companies and research labs",
- href: "#",
- },
-];
-
-export const ADVISETOPICS = [
- { title: "Network science", href: "#" },
- { title: "Complex systems", href: "#" },
- { title: "Bayesian data analysis", href: "#" },
- { title: "Statistical inference", href: "#" },
- { title: "Research and academia", href: "#" },
- { title: "Academics in tech", href: "#" },
-];
-
-export const PROJECTS = [
- {
- title: "plant-pollinator-inference",
- description: (
- <>
- stan
model to infer the network structure that best explains observational data of
- plant-pollinator interactions. Model described in{" "}
- this preprint.
- >
- ),
- href: "https://github.com/jg-you/plant-pollinator-inference/",
- },
- {
- title: "AstroPhysicsAnalysis",
- description: (
- <>
- Toolset developed in Matlab
for analyzing astrophysical data. Detailed research
- methodologies can be found in this{" "}
-
- research paper.
-
- >
- ),
- href: "https://github.com/jg-you/AstroPhysicsAnalysis/",
- },
- {
- title: "DNASequencingAI",
- description: (
- <>
- Artificial Intelligence based system for predicting DNA sequences developed in{" "}
- Python
. More information available in this{" "}
- research article.
- >
- ),
- href: "https://github.com/jg-you/DNASequencingAI/",
- },
- {
- title: "EcoSystemModel",
- description: (
- <>
- Simulation of various ecosystems using C++
. Refer to this{" "}
-
- paper
- {" "}
- for a detailed description.
- >
- ),
- href: "https://github.com/jg-you/EcoSystemModel/",
- },
- {
- title: "BioInformaticsToolkit",
- description: (
- <>
- A comprehensive toolkit for bioinformatics research developed using R
. Detailed in this{" "}
- preprint.
- >
- ),
- href: "https://github.com/jg-you/BioInformaticsToolkit/",
- },
-];
-
-export const EXPERIENCE = [
- {
- institution: "UniversitΓ© Laval",
- roles: [
- {
- position: "Assistant Professor, Department of Physics",
- startDate: new Date(2018, 7),
- endDate: new Date(2011, 7),
- },
- {
- position: "Teaching Assistant",
- startDate: new Date(2011, 4),
- endDate: new Date(2011, 7),
- },
- {
- position: "Teaching Assistant",
- startDate: new Date(2011, 4),
- endDate: new Date(2011, 7),
- },
- ],
- },
- {
- institution: "UniversitΓ© Laval",
- roles: [
- {
- position: "Assistant Professor, Department of Physics",
- startDate: new Date(2018, 7),
- endDate: new Date(2011, 7),
- },
- {
- position: "Teaching Assistant",
- startDate: new Date(2011, 4),
- endDate: new Date(2011, 7),
- },
- {
- position: "Teaching Assistant",
- startDate: new Date(2011, 4),
- endDate: new Date(2011, 7),
- },
- ],
- },
-];
-
-export const PUBLICATIONS = [
- {
- title: "Latent network models to account for noisy, multiply-reported social network data",
- description:
- "C. De Bacco, M. Contisciani, J. Cardoso-Silva, H. Safdari, G. Borges, D. Baptista, T. Sweet, J.-G. Young, J. Koster, C. T. Ross, R. McElreath, D. Redhead, and E. A. Power\nJ. R. Stat. Soc. A, qnac004(2023)",
-
- links: [
- {
- label: "arXiv.org",
- href: "https://www.jgyoung.ca/publications.html#:~:text=A%2C%20qnac004(2023)-,arXiv.org,-%7C%20Journal%20%20%7C",
- },
- { label: "Journal", href: "https://doi.org/10.1093/jrsssa/qnac004" },
- { label: "Software", href: "https://latentnetworks.github.io/vimure/" },
- ],
- },
- {
- title: "Opposing responses to scarcity emerge from functionally unique sociality drivers",
- description:
- "A. B. Kao, A. K. Hund, F. P. Santos, J.-G. Young, D. Bhat, J. Garland, R. A. Oomen, and H. F. McCreery\nAm. Nat. (in press)",
- links: [
- {
- label: "bioRxiv",
- href: "https://dx.doi.org/10.1101/2020.03.17.994343",
- },
- ],
- },
-];
diff --git a/apps/web/pages/ui/valery/podcast-item.js b/apps/web/pages/ui/valery/podcast-item.js
deleted file mode 100644
index f34222352..000000000
--- a/apps/web/pages/ui/valery/podcast-item.js
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Microphone } from "@phosphor-icons/react";
-
-const PodcastItem = ({ podcast }) => {
- return (
-
-
HOST
-
- {podcast?.cover_image && (
-
- )}
- {!podcast?.cover_image && (
-
-
-
- )}
-
-
{podcast?.title}
-
Recent episodes:
- {podcast?.episodes?.length > 0 &&
- podcast?.episodes.map((episode, i) => (
-
- {episode.title}
-
- ))}
-
-
-
- );
-};
-
-export default PodcastItem;
diff --git a/apps/web/pages/ui/valery/project-item.js b/apps/web/pages/ui/valery/project-item.js
deleted file mode 100644
index 8c43b1a7a..000000000
--- a/apps/web/pages/ui/valery/project-item.js
+++ /dev/null
@@ -1,28 +0,0 @@
-import Link from "next/link";
-
-import ExternalLinkIcon from "../../ui/icons/external-link-icon";
-
-const Project = ({ title, description, url }) => (
-
-
-
-
- {title}
-
- {"\u2009"}
-
-
-
-
- {description && (
-
- )}
-
-
-
-);
-
-export default Project;
diff --git a/apps/web/pages/ui/valery/publication-item.js b/apps/web/pages/ui/valery/publication-item.js
deleted file mode 100644
index 42b9104cb..000000000
--- a/apps/web/pages/ui/valery/publication-item.js
+++ /dev/null
@@ -1,33 +0,0 @@
-import Link from "next/link";
-
-const Publication = ({ title, description, links, url }) => (
-
-
- {description && (
-
- {description}
-
- )}
-
- {links &&
- links.map(({ label, href }, index) => (
-
- {label}
-
- ))}
-
-
-);
-
-export default Publication;
diff --git a/apps/web/pages/ui/valery/video-item.js b/apps/web/pages/ui/valery/video-item.js
deleted file mode 100644
index ee335aa93..000000000
--- a/apps/web/pages/ui/valery/video-item.js
+++ /dev/null
@@ -1,64 +0,0 @@
-import { cx } from "class-variance-authority";
-import clsx from "clsx";
-import Link from "next/link";
-import PropTypes from "prop-types";
-import React from "react";
-
-function VideoItem({ video, className }) {
- const getYtCoverImage = (url) => {
- let videoId = "";
-
- const queryParamsMatch = url.match(/[?&]v=([^&]+)/);
- if (queryParamsMatch && queryParamsMatch[1]) {
- videoId = queryParamsMatch[1];
- }
-
- if (!videoId) {
- const shortUrlMatch = url.match(/youtu\.be\/([^?]+)/);
- if (shortUrlMatch && shortUrlMatch[1]) {
- videoId = shortUrlMatch[1];
- }
- }
-
- if (videoId) {
- return `https://img.youtube.com/vi/${videoId}/hqdefault.jpg`;
- } else {
- return null;
- }
- // return null
- };
-
- return (
-
-
-
-
- {/* TODO: when we have view count - change view count to the appropriate variable */}
- {video.viewsCount && (
-
- {video.viewsCount} {video.viewsCount === 1 ? "view" : "views"}
-
- )}
-
-
{video.title}
-
-
- );
-}
-
-VideoItem.propTypes = {
- className: PropTypes.string,
-};
-
-VideoItem.defaultProps = {
- className: "",
-};
-
-export default VideoItem;
diff --git a/yarn.lock b/yarn.lock
index acc7a9433..977418da4 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -4040,6 +4040,9 @@ __metadata:
"@stripe/stripe-js": ^1.35.0
"@tanstack/react-query": ^4.3.9
"@testing-library/react": ^13.3.0
+ "@tiptap/extension-link": ^2.1.11
+ "@tiptap/react": ^2.1.11
+ "@tiptap/starter-kit": ^2.1.11
"@tremor/react": ^2.0.0
"@types/accept-language-parser": 1.5.2
"@types/async": ^3.2.15
@@ -7414,6 +7417,13 @@ __metadata:
languageName: node
linkType: hard
+"@popperjs/core@npm:^2.9.0":
+ version: 2.11.8
+ resolution: "@popperjs/core@npm:2.11.8"
+ checksum: e5c69fdebf52a4012f6a1f14817ca8e9599cb1be73dd1387e1785e2ed5e5f0862ff817f420a87c7fc532add1f88a12e25aeb010ffcbdc98eace3d55ce2139cf0
+ languageName: node
+ linkType: hard
+
"@prisma/client@npm:^5.2.0":
version: 5.2.0
resolution: "@prisma/client@npm:5.2.0"
@@ -11229,6 +11239,260 @@ __metadata:
languageName: node
linkType: hard
+"@tiptap/core@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/core@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/pm": ^2.0.0
+ checksum: 6c02506a0a15a41a51426135a3311c2728dec019c92fdcf5ffd3a94f1ae07574f617dfc7cb23ac535177da96519128168f675a792562457841ae988c1f1bcbca
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-blockquote@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-blockquote@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 89bb81e81af1a5bf98135aadf3f78efcbb9006a6d99b36956aa2f94a705e74823a1fc502023abea2c9176156eeb3074c358ecd229cf7cd27dc1451128f9ecde6
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-bold@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-bold@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 8ef818f57ebdf2507325779778281e89ec58925ffe803b2d11666e7eddc12a6d5bdd4e2cb159d863befa3340cee9bde263990415c42a633e2388cf10b73122b3
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-bubble-menu@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-bubble-menu@npm:2.1.11"
+ dependencies:
+ tippy.js: ^6.3.7
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: f1adf07bae5181ee6014488f31c5306feecf3ee7150560e62dfd6214d89f76bf6665391fe8dea52a35c81b6b78989742a2842f8982d1826564417845f02e8efe
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-bullet-list@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-bullet-list@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 75977e462f1681c44305820b559ecebdbdbad2aff487bd216ce467d349e02e40242f2a78dd1da758090da08e5e87bd32a8cc52d07344b6ca83236fd06f0735e0
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-code-block@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-code-block@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: 208f9c9ad9811dedd677bf39731bbe20acf933a8215e7355f201c6ff6d5a2955f5fe4530b56e9042a656978d5c7fc009a067cedbd028d0b0a3447c808726312f
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-code@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-code@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 766417e2f9b40271f8bfed5515d92405712942f599887e42484d6320acb407017a3b52e3b2129a6fcd24ff38a1dfad2549b449c683cd03d44dbae2a38d777fdc
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-document@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-document@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: f5dcb618f4db6c65d24aedd45a6b740835c480e2d163d62bacee9e3135cd9e26c23365fb9097434ecdb5dfc3a992a520ac132d9c13b47ae99e98729ac607d60d
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-dropcursor@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-dropcursor@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: 0b609a06bded8d14ba32bd81b9366ae7459afa39742f5cf229d9a80d563d84ae1e9f67e344374cf484cd3fb4e889be60b915cd7995941af036df4ffe32ba2bd3
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-floating-menu@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-floating-menu@npm:2.1.11"
+ dependencies:
+ tippy.js: ^6.3.7
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: 3b217e8a4f1158bdac64306a4681a227a334fe978e3d40dd6dc3956f859948ad3844d77557070c6461b6ae5029f18723b0f3cbc2bb405cc1584a752d9f21c578
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-gapcursor@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-gapcursor@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: d321e34b40b92ce1cdb708bf72a2af6ac9401d3224445997a20c0d0597293b950e478b61804be3d745bc99886fac756c72cd58a8c8c8b7fa710f356582c8246f
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-hard-break@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-hard-break@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 09d48a8e87a2aecb59a5d6cc3679b38a0c13d471615de7c997532d3f63e8d59451b09ebfac08b3f0ff0557ffb919bd1a5ec2c0ca58e809a9ca0a764a79ec1b41
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-heading@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-heading@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: bac52ece7d7fe62547f0476e2a326957104a9fdab37db74dddecac5b914337e9f64721ad2d28613185649d5bdc45cd3b97476c8b86e2cbd88f05fe075f9fa2e7
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-history@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-history@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: 3c0a035edc34d7cde77f1511ebc60a38bd28c22b9aeed2bf90488291e00e4d6b021e84ce9f4bcd2d27eb105cc2503638a4609c89952dff86e9b9f32f5e74b3ce
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-horizontal-rule@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-horizontal-rule@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: 58d2a6a6251756bcef5b5dbca61bc35b85746f532f6e5f91802dbbdb34eb6e3272e26a18acb09e72ec4aeadb6a197b731d7d020e57afdf22ad9a9ecaa82ecd95
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-italic@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-italic@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: bb9e7bfa74521911867d882c81632923bd9dffd11e81f56b3fbe11a108e777d8cc4a882d997976546dfc2cbffb9396577296a0f7d37c1dc9e2d5d2e8a6ff6edf
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-link@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-link@npm:2.1.11"
+ dependencies:
+ linkifyjs: ^4.1.0
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ checksum: 59fce6459742728c9e039e945b4bbe33d23097a0d92ae03c2fdf1d189d3402583382aa602c24b59133da51f6f3d1b61b9c45fb4e27735521e99cf366f4a6724b
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-list-item@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-list-item@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 9266fb7519394e93a9a8d25a72e34c2c65bde0d8cc62396e22bcb029e4d1f404d050f78241f25a9e15a3ca649bf891b2f42dbe44576c95eb731494cf21f76ce5
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-ordered-list@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-ordered-list@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 66afcb2762391a065e9c1da94f90d001ac3404b9e3be12c32ffa17b40e9ccacce65eaa63fc90ff6d0d325cf62243a721670e64d70497f2913631b136d0bcd69e
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-paragraph@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-paragraph@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: dd1685fd879662026d5da6641da842ca161fb0e517b89ade8ba8282869a0aec657f3b609ef0f26404c9ae6346152a60d2cd55525d541174d3b3d0a89d061afff
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-strike@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-strike@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: bd799b3da1954246fb2cec16ed96fab532ee5c52dc364989e02545be989c7a6cd5179edae94d30c0ea7505c3bd8ff56453b314519b5c7e01efb8451047c9d793
+ languageName: node
+ linkType: hard
+
+"@tiptap/extension-text@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/extension-text@npm:2.1.11"
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ checksum: 4ca0694cdecd95fabcfa2e1872d72f681a9c9497026bcec01e17c3a3572a0a5089e5466a9b6ea90bb6bfd15bf123ea38f48c7e1290ae25dae0df6ba27be004ca
+ languageName: node
+ linkType: hard
+
+"@tiptap/react@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/react@npm:2.1.11"
+ dependencies:
+ "@tiptap/extension-bubble-menu": ^2.1.11
+ "@tiptap/extension-floating-menu": ^2.1.11
+ peerDependencies:
+ "@tiptap/core": ^2.0.0
+ "@tiptap/pm": ^2.0.0
+ react: ^17.0.0 || ^18.0.0
+ react-dom: ^17.0.0 || ^18.0.0
+ checksum: c018caca9708d14ee024f6c49ff3d186a63df5d12bf40c4a7b3cd14f48a1c8564507b2a44092575df63fac36deca6455951209c8f03fccbd06ea7280f00c0906
+ languageName: node
+ linkType: hard
+
+"@tiptap/starter-kit@npm:^2.1.11":
+ version: 2.1.11
+ resolution: "@tiptap/starter-kit@npm:2.1.11"
+ dependencies:
+ "@tiptap/core": ^2.1.11
+ "@tiptap/extension-blockquote": ^2.1.11
+ "@tiptap/extension-bold": ^2.1.11
+ "@tiptap/extension-bullet-list": ^2.1.11
+ "@tiptap/extension-code": ^2.1.11
+ "@tiptap/extension-code-block": ^2.1.11
+ "@tiptap/extension-document": ^2.1.11
+ "@tiptap/extension-dropcursor": ^2.1.11
+ "@tiptap/extension-gapcursor": ^2.1.11
+ "@tiptap/extension-hard-break": ^2.1.11
+ "@tiptap/extension-heading": ^2.1.11
+ "@tiptap/extension-history": ^2.1.11
+ "@tiptap/extension-horizontal-rule": ^2.1.11
+ "@tiptap/extension-italic": ^2.1.11
+ "@tiptap/extension-list-item": ^2.1.11
+ "@tiptap/extension-ordered-list": ^2.1.11
+ "@tiptap/extension-paragraph": ^2.1.11
+ "@tiptap/extension-strike": ^2.1.11
+ "@tiptap/extension-text": ^2.1.11
+ checksum: 92fa32fade8018782967cf178660b415935c5843486c7937f1ccf9c7280b21dd879fdafa70830b0a6f612ca0224cbbd70d025a54eaeba64247089edb8923055c
+ languageName: node
+ linkType: hard
+
"@tootallnate/once@npm:1":
version: 1.1.2
resolution: "@tootallnate/once@npm:1.1.2"
@@ -24341,6 +24605,13 @@ __metadata:
languageName: node
linkType: hard
+"linkifyjs@npm:^4.1.0":
+ version: 4.1.1
+ resolution: "linkifyjs@npm:4.1.1"
+ checksum: 312b75ec9bc6e7107f2b70e50682e8baccd7b94a64bf7b88cecd352032126b0d6fa7ea41394c417a178c718caa79b70e6ab3570eee7b96a12399689d666e68fb
+ languageName: node
+ linkType: hard
+
"lint-staged@npm:^12.5.0":
version: 12.5.0
resolution: "lint-staged@npm:12.5.0"
@@ -33609,6 +33880,15 @@ __metadata:
languageName: node
linkType: hard
+"tippy.js@npm:^6.3.7":
+ version: 6.3.7
+ resolution: "tippy.js@npm:6.3.7"
+ dependencies:
+ "@popperjs/core": ^2.9.0
+ checksum: cac955318a65288e8d2dca05059878b003c6e66f92c94f7810f5bc5448eb6646abdf7dacc9bd00020e2611592598d0aae3a28ec9a45349a159603c3fdddce5fb
+ languageName: node
+ linkType: hard
+
"title-case@npm:^1.1.0":
version: 1.1.2
resolution: "title-case@npm:1.1.2"
Social Links
-