Skip to content

Commit

Permalink
Revert "Chainlist (#325)" (#327)
Browse files Browse the repository at this point in the history
This reverts commit bb8f884.
  • Loading branch information
JamesLawton authored Oct 8, 2024
1 parent bb8f884 commit e5d46a8
Show file tree
Hide file tree
Showing 2,354 changed files with 128 additions and 93,439 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ vocs.config.ts.timestamp-*
docs/pages/solutions/.DS_Store
.cursorrules
.env*
docs/data
7 changes: 1 addition & 6 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"tsconfig.json",
"tsconfig.*.json",
".vercel",
".vocs",
"./docs/data"
".vocs"
]
},
"formatter": {
Expand All @@ -34,12 +33,8 @@
"correctness": {
"useJsxKeyInIterable": "off"
},
"complexity": {
"noForEach": "off"
},
"suspicious": {
"noAssignInExpressions": "off",
"noPrototypeBuiltins": "off",
"noExplicitAny": "off",
"noArrayIndexKey": "off"
}
Expand Down
Binary file modified docs/.DS_Store
Binary file not shown.
106 changes: 106 additions & 0 deletions docs/components/CodeTabs/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import { useState } from 'react'
// import SyntaxHighlighter from 'react-syntax-highlighter';

import { CopyIcon } from '../Landing/icons'
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter'
import { vscDarkPlus } from 'react-syntax-highlighter/dist/cjs/styles/prism'
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../Tooltip/Tooltip'

type CodeTabsProps = {
tabs: {
label: string
content: string
}[]
}

const CodeTabs: React.FC<CodeTabsProps> = ({ tabs }) => {
const [activeTab, setActiveTab] = useState(0)
const [copied, setCopied] = useState(false)

const handleCopy = () => {
const code = tabs[activeTab].content
navigator.clipboard.writeText(code).then(
() => {
setCopied(true)
setTimeout(() => setCopied(false), 2000)
},
(err) => {
console.error('Error to copy the code: ', err)
},
)
}

return (
<div className="code-tabs">
<div className="code-tabs__tab-header">
{tabs.map((tab, index) => (
<button
key={index}
className={`code-tabs__tab-button ${index === activeTab ? 'active' : ''}`}
onClick={() => setActiveTab(index)}
>
{tab.label}
</button>
))}

<TooltipProvider>
<Tooltip delayDuration={0}>
<TooltipTrigger className="code-tabs__access-key">
<span className="pt-5">
{localStorage.getItem('sequenceProjectAccessKey') ===
'AQAAAAAAADVH8R2AGuQhwQ1y8NaEf1T7PJM' ? (
<div>
<p className="code-tabs__accessKeyText">Using Sample Access Key</p>
</div>
) : (
<div>
<p className="code-tabs__accessKeyText">Using Your Own Access Key</p>
</div>
)}
</span>
</TooltipTrigger>
<TooltipContent style={{ backgroundColor: '#111111' }}>
<p>
{localStorage.getItem('sequenceProjectAccessKey') ===
'AQAAAAAAADVH8R2AGuQhwQ1y8NaEf1T7PJM' ? (
<>
We use a sample access key in order to authenticate your requests. <br /> Please
create an account on{' '}
<a className="font-bold underline" href="https://sequence.build">
Sequence Builder
</a>{' '}
and login with your wallet
<br />
in order to use your own project credentials.
</>
) : (
<>Injecting your own project access key into the code below.</>
)}
</p>
</TooltipContent>
</Tooltip>
</TooltipProvider>
<button
onClick={handleCopy}
className={`copy-button ${copied ? 'copied' : ''}`}
aria-label={copied ? 'Copied!' : 'Copy to clipboard'}
>
{copied ? '✓' : <CopyIcon />}
</button>
</div>
<div className="code-tabs__">
<pre id="code-content">
<SyntaxHighlighter
className="code-content"
language={tabs[activeTab].label.toLowerCase()}
style={vscDarkPlus}
>
{tabs[activeTab].content}
</SyntaxHighlighter>
</pre>
</div>
</div>
)
}

export default CodeTabs
145 changes: 0 additions & 145 deletions docs/components/SwaggerAPIComponent/specParser.js

This file was deleted.

2 changes: 0 additions & 2 deletions docs/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ const Table = ({ rows, columns }: any) => {
<TableCell content={rowData.network} imgSrc={rowData.networkImage} />
<TableCell content={rowData.chainHandle} />
<TableCell content={rowData.indexerEndpoint} />
<TableCell content={rowData.rpcURL} />
<TableCell content={rowData.chainPage} />
</TableRow>
))}
</tbody>
Expand Down
40 changes: 0 additions & 40 deletions docs/pages/solutions/chainlist/Integrated/arbitrum-nova.mdx

This file was deleted.

41 changes: 0 additions & 41 deletions docs/pages/solutions/chainlist/Integrated/arbitrum-sepolia.mdx

This file was deleted.

Loading

0 comments on commit e5d46a8

Please sign in to comment.