Skip to content

Commit

Permalink
Explorer stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
bone-house committed Oct 6, 2023
1 parent 067ca80 commit 9000185
Show file tree
Hide file tree
Showing 16 changed files with 615 additions and 491 deletions.
12 changes: 6 additions & 6 deletions apps/explorer/public/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified apps/explorer/public/logos/sweetscoin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions apps/explorer/src/AllPlatforms.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,30 @@ export function AllPlatforms() {

if (isLoading) {
return (
<Container>
<>
<Flex align="center" justify="center" p="4">
<Loader />
</Flex>
</Container>
</>
)
}

if (error || !sorted) {
return (
<Container>
<>
Failed to fetch all platforms
</Container>
</>
)
}

return (
<Container>
<Grid gap="4">
<>
<Flex direction="column" gap="4">
<Box>
<Text color="gray">All Platforms</Text>
</Box>
<CreatorList creators={sorted} />
</Grid>
</Container>
</Flex>
</>
)
}
3 changes: 0 additions & 3 deletions apps/explorer/src/App.module.css

This file was deleted.

27 changes: 17 additions & 10 deletions apps/explorer/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
import { ExternalLinkIcon, MagnifyingGlassIcon } from '@radix-ui/react-icons'
import { Box, Container, Flex, Link, TextField } from '@radix-ui/themes'
import React from 'react'
import { NavLink, Route, Routes, useNavigate } from 'react-router-dom'
import styles from './App.module.css'
import { NavLink, Route, Routes, useLocation, useNavigate } from 'react-router-dom'
import styled from 'styled-components'
import { AllPlatforms } from './AllPlatforms'
import { Dashboard } from './Dashboard'
import { PlatformView } from './Platform'
import { PlayView } from './PlayView'
import { PlayerView } from './Player'
import { AllPlatforms } from './AllPlatforms'
import { isPubkey, isSignature } from './utils'

const Header = styled(Box)`
background-color: var(--color-panel);
`

export function App() {
const [search, setSearch] = React.useState('')
const location = useLocation()
const navigate = useNavigate()

const submit = (e: React.FormEvent) => {
Expand All @@ -27,16 +32,18 @@ export function App() {
setSearch('')
}

React.useEffect(() =>
document.body.scrollTo({ top: 0, left: 0 })
, [location.key])

return (
<>
<Box className={styles.header} p="2" px="4">
<Header p="2" px="4">
<Container>
<Flex gap="4" align="center">
<Box>
<NavLink to="/">
<img alt="Gamba Explorer" src="/logo2.svg" height="35" />
</NavLink>
</Box>
<NavLink to="/" style={{height: 40, width: 40, display: 'flex'}}>
<img alt="Gamba Explorer" src="/logo.svg" height="40" />
</NavLink>
<Box grow="1">
<form onSubmit={submit}>
<TextField.Root size="3" variant="soft">
Expand Down Expand Up @@ -64,7 +71,7 @@ export function App() {
</Box>
</Flex>
</Container>
</Box>
</Header>
<Container p="4">
<Routes>
<Route
Expand Down
Loading

0 comments on commit 9000185

Please sign in to comment.