add tRPC (#614)
* add trpc * trpc specific * fix deps * lint fix * upgrade prisma * nativeTypes * nope, not needed * fix app propviders * Revert "upgrade prisma" This reverts commit e6f2d2542a01ec82c80aa2fe367ae12c68ded1a5. * rev * up trpc * simplify * wip - bookings page with trpc * bookings using trpc * fix `Shell` props * call it viewerRouter instead * cleanuop * ssg helper * fix lint * fix types * skip * add `useRedirectToLoginIfUnauthenticated` * exhaustive-deps * fix callbackUrl * rewrite `/availability` using trpc Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
0938f6f4b2
commit
34300650e4
18 files changed
+483
-216
No files matched your search
@@ -1,24 +1,26 @@
|
||||
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
||||
import * as Tooltip from "@radix-ui/react-tooltip";
|
||||
import { Maybe } from "@trpc/server";
|
||||
|
||||
import classNames from "@lib/classNames";
|
||||
import { defaultAvatarSrc } from "@lib/profile";
|
||||
|
||||
export type AvatarProps = {
|
||||
className?: string;
|
||||
size: number;
|
||||
imageSrc?: string;
|
||||
size?: number;
|
||||
imageSrc?: Maybe<string>;
|
||||
title?: string;
|
||||
alt: string;
|
||||
gravatarFallbackMd5?: string;
|
||||
};
|
||||
|
||||
export default function Avatar({ imageSrc, gravatarFallbackMd5, size, alt, title, ...props }: AvatarProps) {
|
||||
const className = classNames("rounded-full", props.className, `h-${size} w-${size}`);
|
||||
export default function Avatar(props: AvatarProps) {
|
||||
const { imageSrc, gravatarFallbackMd5, size, alt, title } = props;
|
||||
const className = classNames("rounded-full", props.className, size && `h-${size} w-${size}`);
|
||||
const avatar = (
|
||||
<AvatarPrimitive.Root>
|
||||
<AvatarPrimitive.Image
|
||||
src={imageSrc}
|
||||
src={imageSrc ?? undefined}
|
||||
alt={alt}
|
||||
className={classNames("rounded-full", `h-auto w-${size}`, props.className)}
|
||||
/>
|
||||
|
||||
Reference in new issue
Block a user