Scheduling infrastructure for absolutely everyone.
added verified badge to profile (#1710)
Peer Richelsenfb38c062aee9
diff --git a/pages/[user].tsx b/pages/[user].tsxindex 9506e63fa98..878143a64a3 100644--- a/pages/[user].tsx+++ b/pages/[user].tsx@@ -1,4 +1,5 @@import { ArrowRightIcon } from "@heroicons/react/outline";+import { BadgeCheckIcon } from "@heroicons/react/solid";import { GetServerSidePropsContext } from "next";import Link from "next/link";import { useRouter } from "next/router";@@ -33,7 +34,6 @@ export default function User(props: inferSSRProps<typeof getServerSideProps>) {delete query.user; // So it doesn't display in the Link (and make tests fail)const nameOrUsername = user.name || user.username || "";-const [evtsToVerify, setEvtsToVerify] = useState<EvtsToVerify>({});return (@@ -56,6 +56,9 @@ export default function User(props: inferSSRProps<typeof getServerSideProps>) {/><h1 className="mb-1 text-3xl font-bold font-cal text-neutral-900 dark:text-white">{nameOrUsername}+ {user.verified && (+ <BadgeCheckIcon className="inline w-6 h-6 -mt-1 text-blue-500 dark:text-white" />+ )}</h1><p className="text-neutral-500 dark:text-white">{user.bio}</p></div>@@ -139,6 +142,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) =>theme: true,plan: true,away: true,+ verified: true,},});diff --git a/prisma/migrations/20220205135022_add_verified_column/migration.sql b/prisma/migrations/20220205135022_add_verified_column/migration.sqlnew file mode 100644index 00000000000..2010d1823b8--- /dev/null+++ b/prisma/migrations/20220205135022_add_verified_column/migration.sql@@ -0,0 +1,11 @@+/*+ Warnings:++ - You are about to drop the column `smartContractAddress` on the `EventType` table. All the data in the column will be lost.++*/+-- AlterTable+ALTER TABLE "EventType" DROP COLUMN IF EXISTS "smartContractAddress";++-- AlterTable+ALTER TABLE "users" ADD COLUMN "verified" BOOLEAN DEFAULT false;diff --git a/prisma/schema.prisma b/prisma/schema.prismaindex ebc4eea56a4..bbc591f91c9 100644--- a/prisma/schema.prisma+++ b/prisma/schema.prisma@@ -141,6 +141,7 @@ model User {destinationCalendar DestinationCalendar?away Boolean @default(false)metadata Json?+ verified Boolean? @default(false)@@map(name: "users")}diff --git a/prisma/zod/user.ts b/prisma/zod/user.tsindex 3ef144e960a..aefd6671513 100644--- a/prisma/zod/user.ts+++ b/prisma/zod/user.ts@@ -59,6 +59,7 @@ export const _UserModel = z.object({brandColor: z.string(),away: z.boolean(),metadata: jsonSchema,+ verified: z.boolean().nullish(),});export interface CompleteUser extends z.infer<typeof _UserModel> {