Skip to content

Commit

Permalink
feat: conversation screen POC
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Burtey committed Mar 23, 2024
1 parent 863b48a commit 1d672d6
Show file tree
Hide file tree
Showing 8 changed files with 680 additions and 9 deletions.
1 change: 1 addition & 0 deletions .storybook/storybook.requires.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const getStories = () => {
"./app/screens/authentication-screen/authentication-check-screen.stories.tsx": require("../app/screens/authentication-screen/authentication-check-screen.stories.tsx"),
"./app/screens/authentication-screen/authentication-screen.stories.tsx": require("../app/screens/authentication-screen/authentication-screen.stories.tsx"),
"./app/screens/authentication-screen/pin-screen.stories.tsx": require("../app/screens/authentication-screen/pin-screen.stories.tsx"),
"./app/screens/conversation/conversation.stories.tsx": require("../app/screens/conversation/conversation.stories.tsx"),
"./app/screens/conversion-flow/conversion-success-screen.stories.tsx": require("../app/screens/conversion-flow/conversion-success-screen.stories.tsx"),
"./app/screens/earns-map-screen/earns-map-screen.stories.tsx": require("../app/screens/earns-map-screen/earns-map-screen.stories.tsx"),
"./app/screens/earns-screen/earns-quiz.stories.tsx": require("../app/screens/earns-screen/earns-quiz.stories.tsx"),
Expand Down
4 changes: 2 additions & 2 deletions .storybook/storybook.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import { NotificationsProvider } from "../app/components/notifications"
RNBootSplash.hide({ fade: true })

const StorybookUI = getStorybookUI({
enableWebsockets: true, // for @storybook/react-native-server
enableWebsockets: true,
onDeviceUI: true,
initialSelection: { kind: "Notification Card UI", name: "Default" },
initialSelection: { kind: "Conversation Screen", name: "Default" },
shouldPersistSelection: false,
})

Expand Down
21 changes: 21 additions & 0 deletions app/screens/conversation/conversation.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from "react"
import { StoryScreen } from "../../../.storybook/views"

Check failure on line 2 in app/screens/conversation/conversation.stories.tsx

View workflow job for this annotation

GitHub Actions / Check Code

Replace `import·{·StoryScreen·}·from·"../../../.storybook/views` with `⏎import·{·MockedProvider·}·from·"@apollo/client/testing`
import { Meta } from "@storybook/react"
import { IsAuthedContextProvider } from "../../graphql/is-authed-context"

Check failure on line 4 in app/screens/conversation/conversation.stories.tsx

View workflow job for this annotation

GitHub Actions / Check Code

Replace `import·{·IsAuthedContextProvider·}·from·"../../graphql/is-authed-context` with `⏎import·{·StoryScreen·}·from·"../../../.storybook/views`
import { MockedProvider } from "@apollo/client/testing"

Check failure on line 5 in app/screens/conversation/conversation.stories.tsx

View workflow job for this annotation

GitHub Actions / Check Code

Replace `MockedProvider·}·from·"@apollo/client/testing` with `createCache·}·from·"../../graphql/cache`
import { createCache } from "../../graphql/cache"

Check failure on line 6 in app/screens/conversation/conversation.stories.tsx

View workflow job for this annotation

GitHub Actions / Check Code

Replace `createCache·}·from·"../../graphql/cache` with `IsAuthedContextProvider·}·from·"../../graphql/is-authed-context`
import { ConversationScreen } from "./conversation"

export default {
title: "Conversation Screen",
component: ConversationScreen,
decorators: [(Story) => <StoryScreen>{Story()}</StoryScreen>],
} as Meta<typeof ConversationScreen>

export const Default = () => (
<MockedProvider mocks={[]} cache={createCache()}>
<IsAuthedContextProvider value={true}>
<ConversationScreen />
</IsAuthedContextProvider>
</MockedProvider>
)
Loading

0 comments on commit 1d672d6

Please sign in to comment.