-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
28 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+23.1 KB
...ages/keychain/__image_snapshots__/components-slot-consent--default-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.3 KB
packages/keychain/__image_snapshots__/components-slot-fund--default-chromium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,18 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { Consent } from "./consent"; | ||
import { MemoryRouter, Route, Routes } from "react-router-dom"; | ||
|
||
const meta = { | ||
const meta: Meta<typeof Consent> = { | ||
component: Consent, | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter | ||
initialEntries={["/slot/consent?callback_uri=https://cartridge.gg"]} | ||
> | ||
<Routes> | ||
<Route path="/slot/consent" element={<Story />} /> | ||
</Routes> | ||
</MemoryRouter> | ||
), | ||
], | ||
decorators: [(Story) => <Story />], | ||
parameters: { | ||
connection: { | ||
origin: "https://cartridge.gg", | ||
}, | ||
}, | ||
} satisfies Meta<typeof Consent>; | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; | ||
|
||
export const WithoutCallback: Story = { | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter initialEntries={["/slot/consent"]}> | ||
<Routes> | ||
<Route path="/slot/consent" element={<Story />} /> | ||
</Routes> | ||
</MemoryRouter> | ||
), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,18 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import { Consent } from "./consent"; | ||
import { MemoryRouter, Route, Routes } from "react-router-dom"; | ||
|
||
const meta = { | ||
const meta: Meta<typeof Consent> = { | ||
component: Consent, | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter | ||
initialEntries={["/slot/consent?callback_uri=https://cartridge.gg"]} | ||
> | ||
<Routes> | ||
<Route path="/slot/consent" element={<Story />} /> | ||
</Routes> | ||
</MemoryRouter> | ||
), | ||
], | ||
decorators: [(Story) => <Story />], | ||
parameters: { | ||
connection: { | ||
origin: "https://cartridge.gg", | ||
}, | ||
}, | ||
} satisfies Meta<typeof Consent>; | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; | ||
|
||
export const WithoutCallback: Story = { | ||
decorators: [ | ||
(Story) => ( | ||
<MemoryRouter initialEntries={["/slot/consent"]}> | ||
<Routes> | ||
<Route path="/slot/consent" element={<Story />} /> | ||
</Routes> | ||
</MemoryRouter> | ||
), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,14 @@ | ||
import { Container } from "@/components/layout"; | ||
import { CheckIcon } from "@cartridge/ui-next"; | ||
import { useSearchParams } from "react-router-dom"; | ||
|
||
export function Success() { | ||
const [searchParams] = useSearchParams(); | ||
const title = searchParams.get("title"); | ||
const description = searchParams.get("description"); | ||
|
||
return ( | ||
<Container | ||
variant="expanded" | ||
hideAccount | ||
Icon={CheckIcon} | ||
title={title ? (title as string) : "Success!"} | ||
description={description ? (description as string) : ""} | ||
title="Success!" | ||
description="" | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters