Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/template/extras/src/app/layout/with-trpc-tw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en" className={`${geist.variable}`}>
<html lang="en" className={geist.variable}>
<body>
<TRPCReactProvider>{children}</TRPCReactProvider>
</body>
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/app/layout/with-tw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function RootLayout({
children,
}: Readonly<{ children: React.ReactNode }>) {
return (
<html lang="en" className={`${geist.variable}`}>
<html lang="en" className={geist.variable}>
<body>{children}</body>
</html>
);
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/trpc-app/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/trpc-app/with-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/trpc-app/with-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/trpc-pages/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
2 changes: 1 addition & 1 deletion cli/template/extras/src/server/api/trpc-pages/with-db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const timingMiddleware = t.middleware(async ({ next, path }) => {
const result = await next();

const end = Date.now();
console.log(`[TRPC] ${path} took ${end - start}ms to execute`);
console.log(`[TRPC] ${path} took ${String(end - start)}ms to execute`);

return result;
});
Expand Down
3 changes: 2 additions & 1 deletion cli/template/extras/src/styles/globals.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@import "tailwindcss";

@theme {
--font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif,
--font-sans:
var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}
2 changes: 1 addition & 1 deletion cli/template/extras/src/trpc/react.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
function getBaseUrl() {
if (typeof window !== "undefined") return window.location.origin;
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`;
return `http://localhost:${process.env.PORT ?? 3000}`;
return `http://localhost:${process.env.PORT?.toString() ?? 3000}`;
}
2 changes: 1 addition & 1 deletion cli/template/extras/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { type AppRouter } from "~/server/api/root";
const getBaseUrl = () => {
if (typeof window !== "undefined") return ""; // browser should use relative url
if (process.env.VERCEL_URL) return `https://${process.env.VERCEL_URL}`; // SSR should use vercel url
return `http://localhost:${process.env.PORT ?? 3000}`; // dev SSR should use localhost
return `http://localhost:${process.env.PORT?.toString() ?? 3000}`; // dev SSR should use localhost
};

/** A set of type-safe react-query hooks for your tRPC API. */
Expand Down
Loading