Skip to content

Commit

Permalink
chore: URL on lab pages (#2702)
Browse files Browse the repository at this point in the history
Co-authored-by: Enes <enesozturk.d@gmail.com>
  • Loading branch information
chris13524 and enesozturk authored Aug 16, 2024
1 parent 1742832 commit 2558352
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/laboratory/src/components/AppKitButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Stack, Card, CardHeader, Heading, CardBody, Box, StackDivider } from '@

export function AppKitButtons() {
return (
<Card marginTop={20}>
<Card marginTop={10}>
<CardHeader>
<Heading size="md">AppKit Interactions</Heading>
</CardHeader>
Expand Down
10 changes: 9 additions & 1 deletion apps/laboratory/src/layout/LayoutHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@ import {
Spacer,
Link as CLink,
useDisclosure,
useColorMode
useColorMode,
Text
} from '@chakra-ui/react'
import Link from 'next/link'
import { IoSettingsOutline } from 'react-icons/io5'
import { OptionsDrawer } from './OptionsDrawer'
import { CustomWallet } from './CustomWallet'
import { DownloadIcon } from '@chakra-ui/icons'
import { useChakraToast } from '../components/Toast'
import { useEffect, useState } from 'react'

function downloadLogs(toast: ReturnType<typeof useChakraToast>) {
type WindowWithLogs = typeof Window & {
Expand All @@ -38,6 +40,11 @@ export function LayoutHeader() {
const toast = useChakraToast()
const { colorMode } = useColorMode()

const [host, setHost] = useState('')
useEffect(() => {
setHost(window.location.href)
}, [])

return (
<>
<Stack direction={['column', 'column', 'row']} marginBlockStart={10} justifyContent="center">
Expand Down Expand Up @@ -69,6 +76,7 @@ export function LayoutHeader() {
Logs
</Button>
</Stack>
<Text fontSize="2xs">{host}</Text>

<OptionsDrawer controls={controls} />
<CustomWallet controls={controlsCW} />
Expand Down

0 comments on commit 2558352

Please sign in to comment.