Skip to content

Commit

Permalink
chore(www): bump docusaurus (#6051)
Browse files Browse the repository at this point in the history

---------

Co-authored-by: serhii_s <serhii.sakhniuk@gmail.com>
Co-authored-by: MaksRomanchuk <maksym.romanchuk@keenethics.com>
Co-authored-by: Oleh Lavryk <oleh.lavrik@gmail.com>
  • Loading branch information
4 people authored Sep 27, 2024
1 parent 66e9473 commit c370e09
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ function getConfig(config) {
}

/**
* @link https://nextjs.org/docs/api-reference/next.config.js/introduction
* @see https://nextjs.org/docs/api-reference/next.config.js/introduction
*/
module.exports = getConfig({
/**
* Dynamic configuration available for the browser and server.
* Note: requires `ssr: true` or a `getInitialProps` in `_app.tsx`
* @link https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration
* @see https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration
*/
publicRuntimeConfig: {
NODE_ENV: env.NODE_ENV,
Expand Down
2 changes: 1 addition & 1 deletion prisma/seed.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Adds seed data to your db
*
* @link https://www.prisma.io/docs/guides/database/seed-database
* @see https://www.prisma.io/docs/guides/database/seed-database
*/
import { PrismaClient } from '@prisma/client';

Expand Down
6 changes: 3 additions & 3 deletions src/pages/api/trpc/[trpc].ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import { appRouter } from '~/server/routers/_app';
export default trpcNext.createNextApiHandler({
router: appRouter,
/**
* @link https://trpc.io/docs/v11/context
* @see https://trpc.io/docs/v11/context
*/
createContext,
/**
* @link https://trpc.io/docs/v11/error-handling
* @see https://trpc.io/docs/v11/error-handling
*/
onError({ error }) {
if (error.code === 'INTERNAL_SERVER_ERROR') {
Expand All @@ -21,7 +21,7 @@ export default trpcNext.createNextApiHandler({
}
},
/**
* @link https://trpc.io/docs/v11/caching#api-response-caching
* @see https://trpc.io/docs/v11/caching#api-response-caching
*/
// responseMeta() {
// // ...
Expand Down
6 changes: 3 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ const IndexPage: NextPageWithLayout = () => {
/**
* In a real app you probably don't want to use this manually
* Checkout React Hook Form - it works great with tRPC
* @link https://react-hook-form.com/
* @link https://kitchen-sink.trpc.io/react-hook-form
* @see https://react-hook-form.com/
* @see https://kitchen-sink.trpc.io/react-hook-form
*/
e.preventDefault();
const $form = e.currentTarget;
Expand Down Expand Up @@ -164,7 +164,7 @@ export default IndexPage;
* - Export `appRouter` & `createContext` from [trpc].ts
* - Make the `opts` object optional on `createContext()`
*
* @link https://trpc.io/docs/v11/ssg
* @see https://trpc.io/docs/v11/ssg
*/
// export const getStaticProps = async (
// context: GetStaticPropsContext<{ filter: string }>,
Expand Down
2 changes: 1 addition & 1 deletion src/server/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export type Context = Awaited<ReturnType<typeof createContextInner>>;

/**
* Creates context for an incoming request
* @link https://trpc.io/docs/v11/context
* @see https://trpc.io/docs/v11/context
*/
export async function createContext(
opts: trpcNext.CreateNextContextOptions,
Expand Down
2 changes: 1 addition & 1 deletion src/server/prisma.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* Instantiates a single instance PrismaClient and save it on the global object.
* @link https://www.prisma.io/docs/support/help-articles/nextjs-prisma-client-dev-practices
* @see https://www.prisma.io/docs/support/help-articles/nextjs-prisma-client-dev-practices
*/
import { env } from './env';
import { PrismaClient } from '@prisma/client';
Expand Down
6 changes: 3 additions & 3 deletions src/server/routers/post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { prisma } from '~/server/prisma';
/**
* Default selector for Post.
* It's important to always explicitly say which fields you want to return in order to not leak extra information
* @link https://github.com/prisma/prisma/issues/9353
* @see https://github.com/prisma/prisma/issues/9353
*/
const defaultPostSelect = {
id: true,
Expand All @@ -32,8 +32,8 @@ export const postRouter = router({
.query(async ({ input }) => {
/**
* For pagination docs you can have a look here
* @link https://trpc.io/docs/v11/useInfiniteQuery
* @link https://www.prisma.io/docs/concepts/components/prisma-client/pagination
* @see https://trpc.io/docs/v11/useInfiniteQuery
* @see https://www.prisma.io/docs/concepts/components/prisma-client/pagination
*/

const limit = input.limit ?? 50;
Expand Down
16 changes: 8 additions & 8 deletions src/server/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* - We export only the functionality that we use so we can enforce which base procedures should be used
*
* Learn how to create protected base procedures and other things below:
* @link https://trpc.io/docs/v11/router
* @link https://trpc.io/docs/v11/procedures
* @see https://trpc.io/docs/v11/router
* @see https://trpc.io/docs/v11/procedures
*/

import { initTRPC } from '@trpc/server';
Expand All @@ -14,11 +14,11 @@ import type { Context } from './context';

const t = initTRPC.context<Context>().create({
/**
* @link https://trpc.io/docs/v11/data-transformers
* @see https://trpc.io/docs/v11/data-transformers
*/
transformer,
/**
* @link https://trpc.io/docs/v11/error-formatting
* @see https://trpc.io/docs/v11/error-formatting
*/
errorFormatter({ shape }) {
return shape;
Expand All @@ -27,24 +27,24 @@ const t = initTRPC.context<Context>().create({

/**
* Create a router
* @link https://trpc.io/docs/v11/router
* @see https://trpc.io/docs/v11/router
*/
export const router = t.router;

/**
* Create an unprotected procedure
* @link https://trpc.io/docs/v11/procedures
* @see https://trpc.io/docs/v11/procedures
**/
export const publicProcedure = t.procedure;

/**
* Merge multiple routers together
* @link https://trpc.io/docs/v11/merging-routers
* @see https://trpc.io/docs/v11/merging-routers
*/
export const mergeRouters = t.mergeRouters;

/**
* Create a server-side caller
* @link https://trpc.io/docs/v11/server/server-side-calls
* @see https://trpc.io/docs/v11/server/server-side-calls
*/
export const createCallerFactory = t.createCallerFactory;
2 changes: 1 addition & 1 deletion src/utils/publicRuntimeConfig.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* Dynamic configuration available for the browser and server populated from your `next.config.js`.
* Note: requires `ssr: true` or a `getInitialProps` in `_app.tsx`
* @link https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration
* @see https://nextjs.org/docs/api-reference/next.config.js/runtime-configuration
*/
import type * as config from '../../next.config';
import getConfig from 'next/config';
Expand Down
2 changes: 1 addition & 1 deletion src/utils/transformer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* If you need to add transformers for special data types like `Temporal.Instant` or `Temporal.Date`, `Decimal.js`, etc you can do so here.
* Make sure to import this file rather than `superjson` directly.
* @link https://github.com/blitz-js/superjson#recipes
* @see https://github.com/blitz-js/superjson#recipes
*/
import superjson from 'superjson';

Expand Down
16 changes: 8 additions & 8 deletions src/utils/trpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ export interface SSRContext extends NextPageContext {

/**
* A set of strongly-typed React hooks from your `AppRouter` type signature with `createReactQueryHooks`.
* @link https://trpc.io/docs/v11/react#3-create-trpc-hooks
* @see https://trpc.io/docs/v11/react#3-create-trpc-hooks
*/
export const trpc = createTRPCNext<AppRouter, SSRContext>({
config({ ctx }) {
/**
* If you want to use SSR, you need to use the server's full URL
* @link https://trpc.io/docs/v11/ssr
* @see https://trpc.io/docs/v11/ssr
*/
return {
/**
* @link https://trpc.io/docs/v11/client/links
* @see https://trpc.io/docs/v11/client/links
*/
links: [
// adds pretty logs to your console in development and logs errors in production
Expand All @@ -66,7 +66,7 @@ export const trpc = createTRPCNext<AppRouter, SSRContext>({
url: `${getBaseUrl()}/api/trpc`,
/**
* Set custom request headers on every request from tRPC
* @link https://trpc.io/docs/v11/ssr
* @see https://trpc.io/docs/v11/ssr
*/
headers() {
if (!ctx?.req?.headers) {
Expand All @@ -83,23 +83,23 @@ export const trpc = createTRPCNext<AppRouter, SSRContext>({
return headers;
},
/**
* @link https://trpc.io/docs/v11/data-transformers
* @see https://trpc.io/docs/v11/data-transformers
*/
transformer,
}),
],
/**
* @link https://tanstack.com/query/v5/docs/reference/QueryClient
* @see https://tanstack.com/query/v5/docs/reference/QueryClient
*/
// queryClientConfig: { defaultOptions: { queries: { staleTime: 60 } } },
};
},
/**
* @link https://trpc.io/docs/v11/ssr
* @see https://trpc.io/docs/v11/ssr
*/
ssr: false,
/**
* @link https://trpc.io/docs/v11/data-transformers
* @see https://trpc.io/docs/v11/data-transformers
*/
transformer,
});
Expand Down

0 comments on commit c370e09

Please sign in to comment.