Skip to content

Commit

Permalink
refactor: isolate question editor
Browse files Browse the repository at this point in the history
  • Loading branch information
PupoSDC committed Aug 12, 2023
1 parent c9b0a9a commit 714ec0c
Show file tree
Hide file tree
Showing 39 changed files with 199 additions and 1,396 deletions.
13 changes: 0 additions & 13 deletions .env.local

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ Thumbs.db

# Next.js
.next
.env*
.env.*
!.env.example

*.tsbuildinfo
.vercel

Expand Down
21 changes: 12 additions & 9 deletions apps/docs/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,22 @@ import { Preview } from "@storybook/react";
import { themes } from "@storybook/theming";
import { initialize, mswDecorator, mswLoader } from "msw-storybook-addon";
import { useDarkMode } from "storybook-dark-mode";
import { trpc } from "@chair-flight/trpc/client";
import { theme } from "@chair-flight/react/components";
import { trpc } from "@chair-flight/trpc/client";
import type { TypographyProps } from "@mui/joy";
import "@fontsource/public-sans";

initialize({
onUnhandledRequest: ({ method, url }) => {
if (url.pathname.startsWith("/trpc")) {
if (url.pathname.includes("/trpc")) {
console.error(`Unhandled ${method} request to ${url}.
This exception has been only logged in the console, however, it's strongly recommended to resolve this error as you don't want unmocked data in Storybook stories.
This exception has been only logged in the console, however, it's strongly
recommended to resolve this error as you don't want unmocked data in
Storybook stories.
If you wish to mock an error response, please refer to this guide: https://mswjs.io/docs/recipes/mocking-error-responses
If you wish to mock an error response, please refer to this guide:
https://mswjs.io/docs/recipes/mocking-error-responses
`);
}
},
Expand Down Expand Up @@ -90,18 +93,18 @@ const preview: Preview = {
<Story />
</Suspense>
),
mswDecorator,
(Story) => {
const Component = trpc.withTRPC(Story);
return <Component />;
},
(Story) => (
<CssVarsProvider theme={joyTheme}>
<CssBaseline />
<ToggleDarkMode />
<Story />
</CssVarsProvider>
),
(Story) => {
const Component = trpc.withTRPC(Story);
return <Component />;
},
mswDecorator,
],
};

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 714ec0c

Please sign in to comment.