Skip to content

Commit

Permalink
clean repo
Browse files Browse the repository at this point in the history
  • Loading branch information
rajatsandeepsen committed Apr 23, 2024
1 parent a8513e8 commit 5c8c9d7
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 30 deletions.
6 changes: 3 additions & 3 deletions apps/native/src/components/ui/collapsible.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ const CollapsibleHeader = React.forwardRef<
const CollapsibleTrigger = React.forwardRef<
React.ElementRef<typeof Pressable>,
React.ComponentPropsWithoutRef<typeof Pressable> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean;
}
VariantProps<typeof buttonVariants> & {
asChild?: boolean;
}
>(
(
{
Expand Down
4 changes: 2 additions & 2 deletions apps/native/src/components/ui/section-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ function FlashList<TItem>(
typeof item === "string"
? item
: (item as IdItem)?.id
? (item as IdItem).id ?? String(index)
: String(index),
? (item as IdItem).id ?? String(index)
: String(index),
estimatedItemSize = 50,
renderItem,
renderSectionHeader,
Expand Down
10 changes: 5 additions & 5 deletions apps/native/src/components/universal-ui/context-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ const ContextMenuContent = React.forwardRef<
style={
overlayStyle
? StyleSheet.flatten([
Platform.OS !== "web" ? StyleSheet.absoluteFill : undefined,
overlayStyle,
])
Platform.OS !== "web" ? StyleSheet.absoluteFill : undefined,
overlayStyle,
])
: Platform.OS !== "web"
? StyleSheet.absoluteFill
: undefined
? StyleSheet.absoluteFill
: undefined
}
className={overlayClassName}
>
Expand Down
10 changes: 5 additions & 5 deletions apps/native/src/components/universal-ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ const DropdownMenuContent = React.forwardRef<
style={
overlayStyle
? StyleSheet.flatten([
Platform.OS !== "web" ? StyleSheet.absoluteFill : undefined,
overlayStyle,
])
Platform.OS !== "web" ? StyleSheet.absoluteFill : undefined,
overlayStyle,
])
: Platform.OS !== "web"
? StyleSheet.absoluteFill
: undefined
? StyleSheet.absoluteFill
: undefined
}
className={overlayClassName}
>
Expand Down
4 changes: 2 additions & 2 deletions apps/native/src/components/universal-ui/select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const SelectContent = React.forwardRef<
className={cn(
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-border bg-popover shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
position === "popper" &&
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
open
? "web:zoom-in-95 web:animate-in web:fade-in-0"
: "web:zoom-out-95 web:animate-out web:fade-out-0",
Expand All @@ -114,7 +114,7 @@ const SelectContent = React.forwardRef<
className={cn(
"p-1",
position === "popper" &&
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
)}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ function defaultGetValueLabel(value: number, max: number) {

function isValidValueNumber(value: any, max: number): value is number {
return (
typeof value === "number" && !Number.isNaN(value) && value <= max && value >= 0
typeof value === "number" &&
!Number.isNaN(value) &&
value <= max &&
value >= 0
);
}
4 changes: 1 addition & 3 deletions apps/native/src/lib/rn-primitives/select/select-web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ const Value = React.forwardRef<TextRef, SlottableTextProps & SelectValueProps>(
Value.displayName = "ValueWebSelect";

function Portal({ container, children }: SelectPortalProps) {
return <Select.Portal container={container}>
{children}
</Select.Portal>;
return <Select.Portal container={container}>{children}</Select.Portal>;
}

const Overlay = React.forwardRef<
Expand Down
2 changes: 1 addition & 1 deletion apps/native/src/utils/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export function TRPCProvider(props: { children: React.ReactNode }) {
const [queryClient] = React.useState(() => new QueryClient());
const [trpcClient] = React.useState(() =>
api.createClient({
transformer: superjson,
links: [
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
Expand All @@ -57,6 +56,7 @@ export function TRPCProvider(props: { children: React.ReactNode }) {
headers.set("x-trpc-source", "expo-react");
return Object.fromEntries(headers);
},
transformer: superjson,
}),
],
}),
Expand Down
10 changes: 8 additions & 2 deletions apps/web/src/app/_components/auth-showcase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ export async function AuthShowcase() {
await signIn("discord");
}}
>
<button type="submit" className="rounded-full bg-white/10 px-10 py-3 font-semibold no-underline transition hover:bg-white/20">
<button
type="submit"
className="rounded-full bg-white/10 px-10 py-3 font-semibold no-underline transition hover:bg-white/20"
>
Sign in with Discord
</button>
</form>
Expand All @@ -30,7 +33,10 @@ export async function AuthShowcase() {
await signOut();
}}
>
<button type="submit" className="rounded-full bg-white/10 px-10 py-3 font-semibold no-underline transition hover:bg-white/20">
<button
type="submit"
className="rounded-full bg-white/10 px-10 py-3 font-semibold no-underline transition hover:bg-white/20"
>
Sign out
</button>
</form>
Expand Down
12 changes: 7 additions & 5 deletions apps/web/src/app/_components/posts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export function CreatePostForm() {
{error.data.zodError.fieldErrors.content}
</span>
)}
{ }
{}
<button type="submit" className="rounded bg-pink-400 p-2 font-bold">
Create
</button>
Expand Down Expand Up @@ -132,14 +132,16 @@ export function PostCardSkeleton(props: {
<div className="flex flex-row rounded-lg bg-white/10 p-4 transition-all hover:scale-[101%]">
<div className="flex-grow">
<h2
className={`w-1/4 rounded bg-pink-400 text-2xl font-bold ${pulse && "animate-pulse"
}`}
className={`w-1/4 rounded bg-pink-400 text-2xl font-bold ${
pulse && "animate-pulse"
}`}
>
&nbsp;
</h2>
<p
className={`mt-2 w-1/3 rounded bg-current text-sm ${pulse && "animate-pulse"
}`}
className={`mt-2 w-1/3 rounded bg-current text-sm ${
pulse && "animate-pulse"
}`}
>
&nbsp;
</p>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export function TRPCReactProvider(props: {

const [trpcClient] = useState(() =>
api.createClient({
transformer: superjson,
links: [
loggerLink({
enabled: (opts) =>
Expand All @@ -48,6 +47,7 @@ export function TRPCReactProvider(props: {
headers.set("x-trpc-source", "nextjs-react");
return Object.fromEntries(headers);
},
transformer: superjson,
}),
],
}),
Expand Down
15 changes: 15 additions & 0 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,21 @@
"^topo"
]
},
"format": {
"dependsOn": [
"^topo"
]
},
"lint:fix": {
"dependsOn": [
"^topo"
]
},
"format:fix": {
"dependsOn": [
"^topo"
]
},
"typecheck": {
"dependsOn": [
"^topo"
Expand Down

0 comments on commit 5c8c9d7

Please sign in to comment.