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 08f3d70
Show file tree
Hide file tree
Showing 3 changed files with 4 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
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
8 changes: 2 additions & 6 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 All @@ -44,9 +42,8 @@ export function Footer({
() => (origin ? new URL(origin).hostname : undefined),
[origin],
);
const maxH = `${
(isIframe() ? window.innerHeight : PORTAL_WINDOW_HEIGHT) - TOP_BAR_HEIGHT
}px`;
const maxH = `${(isIframe() ? window.innerHeight : PORTAL_WINDOW_HEIGHT) - TOP_BAR_HEIGHT
}px`;
const { footerHeight } = useLayout();

useEffect(() => {
Expand Down Expand Up @@ -97,7 +94,6 @@ export function Footer({
>
<TransactionSummary
isSlot={isSlot}
showTerm={showTerm}
createSession={createSession}
hostname={hostname}
/>
Expand Down

0 comments on commit 08f3d70

Please sign in to comment.