Skip to content

Commit

Permalink
Show create session message in CreateSession component
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Jun 18, 2024
1 parent a14a0a1 commit 1e035c6
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 33 deletions.
2 changes: 1 addition & 1 deletion packages/keychain/src/components/connect/CreateSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export function CreateSession({
title="Create Session"
description={`${origin} is requesting to connect to your Cartridge Controller`}
>
<Footer>
<Footer createSession>
<Button
colorScheme="colorful"
isDisabled={isConnecting}
Expand Down
11 changes: 10 additions & 1 deletion packages/keychain/src/components/connect/RegistrationLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,16 @@ export function RegistrationLink({
{description}
</Text>

<Button variant="gohst" onClick={onClick} textTransform="none" px={4} py={2} fontWeight="medium" color="link.blue" fontSize="xs">
<Button
variant="gohst"
onClick={onClick}
textTransform="none"
px={4}
py={2}
fontWeight="medium"
color="link.blue"
fontSize="xs"
>
{children}
</Button>
</HStack>
Expand Down
3 changes: 1 addition & 2 deletions packages/keychain/src/components/connect/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ function Form({ isSlot, onLogin, onSuccess }: SignupProps) {
cacheTime: 10000000,
refetchInterval: (data) => (!data ? 1000 : undefined),
onSuccess: async (data) => {

console.log({chainId})
console.log({ chainId });
// Deploy account
await client.request(DeployAccountDocument, {
id: values.username,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { HStack, VStack, Text, Link } from "@chakra-ui/react";
import { HStack, VStack, Text } from "@chakra-ui/react";
import { WebsiteIcon } from "@cartridge/ui";

export function TransactionSummary({
isSlot,
showTerm,
createSession,
hostname,
}: {
isSlot: boolean;
showTerm: boolean;
createSession: boolean;
hostname: string;
}) {
Expand All @@ -31,29 +29,6 @@ export function TransactionSummary({
{isSlot && (
<Summary title="Authorize Slot to manage your Cartridge infrastructure" />
)}

{!!showTerm && (
<Summary>
<>
By continuing you are agreeing to Cartridge&apos;s{" "}
<Link
textDecoration="underline"
href="https://cartridgegg.notion.site/Cartridge-Terms-of-Use-a7e65445041449c1a75aed697b2f6e62"
isExternal
>
Terms of Service
</Link>{" "}
and{" "}
<Link
textDecoration="underline"
href="https://cartridgegg.notion.site/Cartridge-Privacy-Policy-747901652aa34c6fb354c7d91930d66c"
isExternal
>
Privacy Policy
</Link>
</>
</Summary>
)}
</VStack>
);
}
Expand Down
3 changes: 0 additions & 3 deletions packages/keychain/src/components/layout/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@ import { TOP_BAR_HEIGHT } from "../Container/Header/TopBar";
export function Footer({
children,
isSlot = false,
showTerm = false,
createSession = false,
}: React.PropsWithChildren & {
isSlot?: boolean;
showTerm?: boolean;
createSession?: boolean;
}) {
const { setFooterHeight } = useLayout();
Expand Down Expand Up @@ -97,7 +95,6 @@ export function Footer({
>
<TransactionSummary
isSlot={isSlot}
showTerm={showTerm}
createSession={createSession}
hostname={hostname}
/>
Expand Down

0 comments on commit 1e035c6

Please sign in to comment.