diff --git a/frontend/src/app/components/banner.tsx b/frontend/src/app/components/banner.tsx index 443ed560..9249e85d 100644 --- a/frontend/src/app/components/banner.tsx +++ b/frontend/src/app/components/banner.tsx @@ -1,62 +1,64 @@ "use client"; -import { useEffect, useState } from 'react'; -import classes from './banner.module.css'; +import { useEffect, useState } from "react"; +import classes from "./banner.module.css"; function DiscordIcon() { - return ( - - ); + return ( + + + + + + + + + + ); } -function CloseButton({ - onClick, -}: { - onClick: () => void, -}) { - return ( - - ); +function CloseButton({ onClick }: { onClick: () => void }) { + return ( + + ); } -export default function Banner () { - const [bannerClosed, setBannerClosed] = useState(true); - - useEffect(() => { - const bannerClosedStorageValue = localStorage.getItem("bannerClosed"); - - if (bannerClosedStorageValue === "false" || !bannerClosedStorageValue) { - setBannerClosed(false); - } - }, []); +export default function Banner() { + const [bannerClosed, setBannerClosed] = useState(true); + useEffect(() => { + const bannerClosedStorageValue = localStorage.getItem("bannerClosed"); - if (bannerClosed) { - return null; + if (bannerClosedStorageValue === "false" || !bannerClosedStorageValue) { + setBannerClosed(false); } + }, []); - return ( -
-
- ✨ - - Million - - ✨ tokens minted so far... πŸš€πŸŒ™, Follow the project on ourΒ  - discord -
- { - localStorage.setItem("bannerClosed", "true"); - setBannerClosed(true); - }} - /> -
- ); -} \ No newline at end of file + if (bannerClosed) { + return null; + } + + return ( +
+
+ ✨Million✨ tokens minted so far... πŸš€πŸŒ™, Follow the project on ourΒ  + discord + +
+ { + localStorage.setItem("bannerClosed", "true"); + setBannerClosed(true); + }} + /> +
+ ); +} diff --git a/frontend/src/app/components/footer.tsx b/frontend/src/app/components/footer.tsx index dd030eb7..8f4042a5 100644 --- a/frontend/src/app/components/footer.tsx +++ b/frontend/src/app/components/footer.tsx @@ -1,33 +1,31 @@ -import config from '@/config'; -import classes from './footer.module.css'; +import config from "@/config"; +import classes from "./footer.module.css"; function OpenIcon() { return ( -
πŸ“š Docs
@@ -35,26 +33,27 @@ export default function Footer() {
πŸ”— Community
-
- βž• More -
+
βž• More
-
- Copyright Β© 2023 Commune, Inc. Built with Docusaurus. -
+
Copyright Β© 2023 Commune, Inc. Built with Docusaurus.
); -} \ No newline at end of file +} diff --git a/frontend/src/app/components/navigation-bar.tsx b/frontend/src/app/components/navigation-bar.tsx index 04f45876..981d5154 100644 --- a/frontend/src/app/components/navigation-bar.tsx +++ b/frontend/src/app/components/navigation-bar.tsx @@ -4,591 +4,550 @@ import { loadStripe } from "@stripe/stripe-js"; import { useRouter } from "next/navigation"; import config from "@/config"; import ThemeToggler from "./theme-toggler"; -import { useSelector, useDispatch } from 'react-redux' +import { useSelector, useDispatch } from "react-redux"; -import classes from './navigation-bar.module.css'; +import classes from "./navigation-bar.module.css"; import classNames from "classnames"; import ActiveLink from "./active-link"; -import type { MenuProps } from 'antd'; -import { Dropdown, Modal, Space, Select } from 'antd'; +import type { MenuProps } from "antd"; +import { Dropdown, Modal, Space, Select } from "antd"; import { DownOutlined } from "@ant-design/icons"; -import StripeImage from '../../../public/img/frontpage/stripe.png' +import StripeImage from "../../../public/img/frontpage/stripe.png"; import Image from "next/image"; -import { ConnectButton } from '@rainbow-me/rainbowkit'; -import MetaMaskImage from '../../../public/svg/metamask.svg' -import { useSendTransaction, useContractWrite } from 'wagmi' -import { parseEther } from 'viem' +import { ConnectButton } from "@rainbow-me/rainbowkit"; +import MetaMaskImage from "../../../public/svg/metamask.svg"; +import { useSendTransaction, useContractWrite } from "wagmi"; +import { parseEther } from "viem"; import axios from "axios"; -import * as erc20ContractABI from '../../services/token_abi.json'; +import * as erc20ContractABI from "../../services/token_abi.json"; import { saveTransaction } from "@/store/action/transaction.record.action"; -const items: MenuProps['items'] = [ - { - key: '1', - label: ( - - Pay with Stripe - stripeImage - - ), - }, - { - key: '2', - label: ( - - Pay with Wallet - MetaMaskImage - - ), - }, -] +const items: MenuProps["items"] = [ + { + key: "1", + label: ( + + Pay with Stripe + stripeImage + + ), + }, + { + key: "2", + label: ( + + Pay with Wallet + MetaMaskImage + + ), + }, +]; function DiscordIcon() { - return ( - - - - - - - - - - ); + return ( + + + + + + + + + + ); } function TwitterIcon() { - return ( - - - - ); + return ( + + + + ); } function GitHubIcon() { - return ( - - GitHub - - - ); + return ( + + GitHub + + + ); } export default function NavigationBar() { - - const [isShowWalletPaymentModal, setIsShowWalletPaymentModal] = React.useState(false) - const [destinationAddress, setDestinationAddress] = React.useState('') - const [amount, setAmount] = React.useState('') - const [tokenType, setTokenType] = React.useState('') - const [selectedChain, setSelectedChain] = React.useState('') - - const asyncStripe = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY || ''); - const { abi: erc20ABI } = erc20ContractABI - - const router = useRouter(); - // const dispatch = useDispatch() - - const handleClickPayButton = async () => { - try { - - let amount = 1; - const stripe = await asyncStripe; - const res = await fetch("/api/stripe/session", { - method: "POST", - body: JSON.stringify({ - amount, - }), - headers: { "Content-Type": "application/json" }, - }); - - const { sessionId } = await res.json(); - - const result = await stripe?.redirectToCheckout({ sessionId }); - - // Check if 'error' exists in the result - if (result?.error) { - router.push("/error"); - } - } catch (err) { - router.push("/error"); - } - }; - - const handleMetaMaskPayment = () => { - setIsShowWalletPaymentModal(true) + const [isShowWalletPaymentModal, setIsShowWalletPaymentModal] = React.useState(false); + const [destinationAddress, setDestinationAddress] = React.useState(""); + const [amount, setAmount] = React.useState(""); + const [tokenType, setTokenType] = React.useState(""); + const [selectedChain, setSelectedChain] = React.useState(""); + + const asyncStripe = loadStripe(process.env.NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY || ""); + const { abi: erc20ABI } = erc20ContractABI; + + const router = useRouter(); + // const dispatch = useDispatch() + + const handleClickPayButton = async () => { + try { + let amount = 1; + const stripe = await asyncStripe; + const res = await fetch("/api/stripe/session", { + method: "POST", + body: JSON.stringify({ + amount, + }), + headers: { "Content-Type": "application/json" }, + }); + + const { sessionId } = await res.json(); + + const result = await stripe?.redirectToCheckout({ sessionId }); + + // Check if 'error' exists in the result + if (result?.error) { + router.push("/error"); + } + } catch (err) { + router.push("/error"); } + }; - const onClick: MenuProps['onClick'] = ({ key }) => { - if (key === '1') { - handleClickPayButton() - } - if (key === '2') { - handleMetaMaskPayment() - } - }; + const handleMetaMaskPayment = () => { + setIsShowWalletPaymentModal(true); + }; - const handleWalletPaymentModalOpen = () => { - setIsShowWalletPaymentModal(false) + const onClick: MenuProps["onClick"] = ({ key }) => { + if (key === "1") { + handleClickPayButton(); } - - const handleChange = (value: string) => { - setTokenType(value) - }; - - const { data: hash, sendTransaction } = useSendTransaction() - // const { write } = useContractWrite({ - // abi, - // address: '0x6b175474e89094c44da98b954eedeac495271d0f', - // functionName: 'transfer', - // args: [ - // '0xd2135CfB216b74109775236E36d4b433F1DF507B', - // '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', - // BigInt(123), - // ], - // }) - - //This Function must be used in Client side. - const createBTCTx = async (toAddress: string, value: number, env: string, fromAddress: string) => { + if (key === "2") { + handleMetaMaskPayment(); + } + }; + + const handleWalletPaymentModalOpen = () => { + setIsShowWalletPaymentModal(false); + }; + + const handleChange = (value: string) => { + setTokenType(value); + }; + + const { data: hash, sendTransaction } = useSendTransaction(); + // const { write } = useContractWrite({ + // abi, + // address: '0x6b175474e89094c44da98b954eedeac495271d0f', + // functionName: 'transfer', + // args: [ + // '0xd2135CfB216b74109775236E36d4b433F1DF507B', + // '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e', + // BigInt(123), + // ], + // }) + + //This Function must be used in Client side. + const createBTCTx = async (toAddress: string, value: number, env: string, fromAddress: string) => { + try { + // const { toAddress, value, env, fromAddress } = data; + const valueInSatoshi = value * 100000000; + // console.log(valueInSatoshi); + // console.log("Vivek bhai ",toAddress, value, env, fromAddress); + if (!fromAddress || !toAddress || !value || !env) { + return { + code: 0, + message: "invalid/insufficient parameters", + }; + } + let url; + if (env == "testnet") { + url = "https://api.blockcypher.com/v1/btc/test3/txs/new"; + } else if (env == "mainnet") { + url = "https://api.blockcypher.com/v1/btc/main/txs/new"; + } else { + return { + code: 0, + message: "Invalid env", + }; + } + let data = JSON.stringify({ + inputs: [ + { + addresses: [`${fromAddress}` /* "n1TKu4ZX7vkyjfvo7RCbjeUZB6Zub8N3fN" */], + }, + ], + outputs: [ + { + addresses: [ + `${toAddress}` + /* "2NCY42y4mbvJCxhd7gcCroBEvVh1dXkbPzA" + */, + ], + value: valueInSatoshi, + }, + ], + }); + + let config = { + method: "post", + maxBodyLength: Infinity, + url: "https://api.blockcypher.com/v1/btc/test3/txs/new", + headers: { + "Content-Type": "application/json", + }, + data: data, + }; + + const response = await axios + .request(config) + .then((response) => { + // console.log("Tushar",JSON.stringify(response.data)); + return response; + }) + .catch((error) => { + console.log(error); + }); + // console.log(response.status); + if (response?.status != 201) { + return { + code: 0, + message: response?.data?.error, + }; + } + return { + code: 1, + result: response.data, + }; + } catch (error) { + console.log("error generating btc tx", error); + return { + code: 0, + message: error, + }; + } + }; + + // //This Function must be used in Client side. + // const generateSignatures = (privateKey: string, env: string, toSign: any, ecc: any) => { + // try { + // const ECPair = ecfacory.ECPairFactory(ecc); + // // console.log(ECPair); + // let keys; + // if (env == 'testnet') { + // keys = ECPair.fromWIF(privateKey, bitcoin.networks.testnet); + // // console.log(keys); + // } else if (env == 'mainnet') { + // keys = ECPair.fromWIF(privateKey, bitcoin.networks.bitcoin); + // // console.log(keys); + // } else { + // return { + // code: 0, + // error: INVALID_ENV, + // }; + // } + // const signatures = []; + // const pubkeys = []; + // for (let i = 0; i < toSign.length; i++) { + // // console.log(i,"Data"); + // signatures.push( + // bitcoin.script.signature + // .encode(keys.sign(Buffer.from(toSign[i], 'hex')), 0x01) + // .toString('hex') + // .slice(0, -2), + // ); + // pubkeys.push(keys.publicKey.toString('hex')); + // } + // // console.log("Signature", signatures, "Pubkeys", pubkeys); + // return { + // code: 1, + // signatures, + // pubkeys, + // }; + // } catch (error/* : any */) { + // return { + // code: 0, + // error, + // }; + // } + // }; + // const { write: paywithUSDT } = useContractWrite({ + // address: '0x55d398326f99059ff775485246999027b3197955', + // abi: erc20ABI, + // functionName: 'transfer' + // }) + + const { data: txHashUSDT, write: paywithUSDT } = useContractWrite({ + address: "0x28B3071bE7A6E4B3bE2b36D78a29b6e4DbBdDb74", + abi: erc20ABI, + functionName: "transfer", + }); + + const { data: txHashUSDC, write: paywithUSDC } = useContractWrite({ + address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", + abi: erc20ABI, + functionName: "transfer", + }); + + const handlePayWithWallet = () => { + if (tokenType === "eth") { + // if (selectedChain !== 'Ethereum') { + // window.alert('Please change your chain to Ethereum') + // } else { + // sendTransaction({ to: destinationAddress, value: parseEther(amount) }) + // } + sendTransaction({ to: destinationAddress, value: parseEther(amount) }); + } + if (tokenType === "matic") { + if (selectedChain !== "Polygon") { + window.alert("Please change your chain to Polygon"); + } else { + sendTransaction({ to: destinationAddress, value: parseEther(amount) }); + } + } + if (tokenType === "usdt") { + paywithUSDT({ args: [destinationAddress, amount] }); + } + if (tokenType === "usdc") { + paywithUSDC({ args: [destinationAddress, amount] }); + } + if (tokenType === "bitcoin") { + const transfer = async (privateKey: string, value: number, receiver: string, env: string, address: string, ecc: any) => { try { - // const { toAddress, value, env, fromAddress } = data; - const valueInSatoshi = value * 100000000; - // console.log(valueInSatoshi); - // console.log("Vivek bhai ",toAddress, value, env, fromAddress); - if (!fromAddress || !toAddress || !value || !env) { - return { - code: 0, - message: "invalid/insufficient parameters" - } - } - let url; - if (env == 'testnet') { - url = 'https://api.blockcypher.com/v1/btc/test3/txs/new' - } - else if (env == 'mainnet') { - url = 'https://api.blockcypher.com/v1/btc/main/txs/new' - } - else { - return { - code: 0, - message: 'Invalid env' - } - } - let data = JSON.stringify({ - "inputs": [ - { - "addresses": [ - `${fromAddress}` /* "n1TKu4ZX7vkyjfvo7RCbjeUZB6Zub8N3fN" */ - ] - } - ], - "outputs": [ - { - "addresses": [ - `${toAddress}` /* "2NCY42y4mbvJCxhd7gcCroBEvVh1dXkbPzA" - */ ], - "value": valueInSatoshi - } - ] - }); - - let config = { - method: 'post', - maxBodyLength: Infinity, - url: 'https://api.blockcypher.com/v1/btc/test3/txs/new', - headers: { - 'Content-Type': 'application/json' - }, - data: data - }; - - const response = await axios.request(config) - .then((response) => { - // console.log("Tushar",JSON.stringify(response.data)); - return response; - }) - .catch((error) => { - console.log(error); - }); - // console.log(response.status); - if (response?.status != 201) { - return { - code: 0, - message: response?.data?.error - } - } - return { - code: 1, - result: response.data - } - + const createTxResponse = await createBTCTx(receiver, value, env, address); + // console.log(createTxResponse, "createTxResponsecreateTxResponse"); + if (createTxResponse?.code != 1) return createTxResponse; + const tx = createTxResponse.result.tx; + const toSign = createTxResponse.result.tosign; + // // console.log(tx, toSign); + // const generateSignaturesResponse = generateSignatures(privateKey, env, toSign, ecc); + // if (generateSignaturesResponse?.code != 1) return generateSignaturesResponse; + // const signatures = generateSignaturesResponse.signatures; + // const pubkeys = generateSignaturesResponse.pubkeys; + // // console.log("signature",signatures); + // // console.log(pubkeys); + // if (!signatures || !pubkeys) { + // return { + // code: 0, + // error: 'ERROR_BTC_SIGNATURES', + // }; + // } + // return { + // tx, toSign, signatures, pubkeys, env + // }; } catch (error) { - console.log('error generating btc tx', error); - return { - code: 0, - message: error, - }; + return { + code: 0, + error, + }; } - + }; } + }; - // //This Function must be used in Client side. - // const generateSignatures = (privateKey: string, env: string, toSign: any, ecc: any) => { - // try { - // const ECPair = ecfacory.ECPairFactory(ecc); - // // console.log(ECPair); - // let keys; - // if (env == 'testnet') { - // keys = ECPair.fromWIF(privateKey, bitcoin.networks.testnet); - // // console.log(keys); - // } else if (env == 'mainnet') { - // keys = ECPair.fromWIF(privateKey, bitcoin.networks.bitcoin); - // // console.log(keys); - // } else { - // return { - // code: 0, - // error: INVALID_ENV, - // }; - // } - // const signatures = []; - // const pubkeys = []; - // for (let i = 0; i < toSign.length; i++) { - // // console.log(i,"Data"); - // signatures.push( - // bitcoin.script.signature - // .encode(keys.sign(Buffer.from(toSign[i], 'hex')), 0x01) - // .toString('hex') - // .slice(0, -2), - // ); - // pubkeys.push(keys.publicKey.toString('hex')); - // } - // // console.log("Signature", signatures, "Pubkeys", pubkeys); - // return { - // code: 1, - // signatures, - // pubkeys, - // }; - // } catch (error/* : any */) { - // return { - // code: 0, - // error, - // }; - // } - // }; - // const { write: paywithUSDT } = useContractWrite({ - // address: '0x55d398326f99059ff775485246999027b3197955', - // abi: erc20ABI, - // functionName: 'transfer' - // }) - - const { data: txHashUSDT, write: paywithUSDT } = useContractWrite({ - address: '0x28B3071bE7A6E4B3bE2b36D78a29b6e4DbBdDb74', - abi: erc20ABI, - functionName: 'transfer' - }) - - const { data: txHashUSDC, write: paywithUSDC } = useContractWrite({ - address: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', - abi: erc20ABI, - functionName: 'transfer' - }) - - const handlePayWithWallet = () => { - if (tokenType === 'eth') { - // if (selectedChain !== 'Ethereum') { - // window.alert('Please change your chain to Ethereum') - // } else { - // sendTransaction({ to: destinationAddress, value: parseEther(amount) }) - // } - sendTransaction({ to: destinationAddress, value: parseEther(amount) }) - } - if (tokenType === 'matic') { - if (selectedChain !== 'Polygon') { - window.alert('Please change your chain to Polygon') - } else { - sendTransaction({ to: destinationAddress, value: parseEther(amount) }) - } - } - if (tokenType === 'usdt') { - - paywithUSDT({ args: [destinationAddress, amount] }); - - } - if (tokenType === 'usdc') { - - paywithUSDC({ args: [destinationAddress, amount] }); - - } - if (tokenType === 'bitcoin') { - const transfer = async ( - privateKey: string, - value: number, - receiver: string, - env: string, - address: string, - ecc: any, - ) => { - try { - const createTxResponse = await createBTCTx(receiver, value, env, address); - // console.log(createTxResponse, "createTxResponsecreateTxResponse"); - if (createTxResponse?.code != 1) return createTxResponse; - const tx = createTxResponse.result.tx; - const toSign = createTxResponse.result.tosign; - // // console.log(tx, toSign); - // const generateSignaturesResponse = generateSignatures(privateKey, env, toSign, ecc); - // if (generateSignaturesResponse?.code != 1) return generateSignaturesResponse; - // const signatures = generateSignaturesResponse.signatures; - // const pubkeys = generateSignaturesResponse.pubkeys; - // // console.log("signature",signatures); - // // console.log(pubkeys); - // if (!signatures || !pubkeys) { - // return { - // code: 0, - // error: 'ERROR_BTC_SIGNATURES', - // }; - // } - // return { - // tx, toSign, signatures, pubkeys, env - // }; - } catch (error) { - return { - code: 0, - error, - }; - } - }; - } - } - - if (hash || txHashUSDT || txHashUSDC) { - - let selectedHash = hash || txHashUSDT || txHashUSDC; - - if (selectedHash) { - saveTransaction(tokenType, parseFloat(amount), destinationAddress, selectedHash.hash); - } + if (hash || txHashUSDT || txHashUSDC) { + let selectedHash = hash || txHashUSDT || txHashUSDC; + if (selectedHash) { + saveTransaction(tokenType, parseFloat(amount), destinationAddress, selectedHash.hash); } - - return ( - + ); } function NavigationBar2() { - return ( - - ); + return ( + + ); } diff --git a/frontend/src/app/docs/components/docs-menu.tsx b/frontend/src/app/docs/components/docs-menu.tsx index 22c95f00..2514fe18 100644 --- a/frontend/src/app/docs/components/docs-menu.tsx +++ b/frontend/src/app/docs/components/docs-menu.tsx @@ -1,113 +1,124 @@ import Link from "next/link"; -import classes from './docs-menu.module.css'; +import classes from "./docs-menu.module.css"; import ActiveLink from "@/app/components/active-link"; -const MENU_ITEMS = [{ - name: 'πŸ‘‹ Introduction', - url: '/docs/introduction' -}, { - name: 'πŸ”½ Setup Commune', - url: '/docs/setup-commune' -}, { - name: 'Basics', - url: '/docs/basics', - submenuItems: [{ - name: 'Create Commune', - url: '/docs/basics/create-commune' - },{ - name: 'Deploy Module', - url: '/docs/basics/deploy-module' - },{ - name: 'Register Commune', - url: '/docs/basics/register-commune' - },{ - name: 'Namespace', - url: '/docs/basics/namespace' - },{ - name: 'Connect a Module', - url: '/docs/basics/connect-module' - },{ - name: 'PyParse Cli Basics', - url: '/docs/basics/cli-basics' - },{ - name: 'Key Basics', - url: '/docs/basics/key-basics' - }], -}, { - name: 'Modules', - url: '/docs/modules', - submenuItems: [{ - name: 'Module Basics', - url: '/docs/modules/module-basics' - },{ - name: 'Bittensor', - url: '/docs/modules/bittensor' - },{ - name: 'Data-hf', - url: '/docs/modules/data-hf' - },{ - name: 'Model Transformer', - url: '/docs/modules/model-hf' - },{ - name: 'Data text realfakes', - url: '/docs/modules/data-text-realfake' - },{ - name: 'Data text truthqa', - url: '/docs/modules/data-text-truthqa' - },{ - name: 'Translate your site', - url: '/docs/modules/translate-your-site' - },{ - name: 'Model Openai', - url: '/docs/modules/model-openai' - },{ - name: 'Validator', - url: '/docs/modules/validator' - },{ - name: 'Vali text realfake', - url: '/docs/modules/vali-text-realfake' - }], -}]; +const MENU_ITEMS = [ + { + name: "πŸ‘‹ Introduction", + url: "/docs/introduction", + }, + { + name: "πŸ”½ Setup Commune", + url: "/docs/setup-commune", + }, + { + name: "Basics", + url: "/docs/basics/create-commune", + submenuItems: [ + { + name: "Create Commune", + url: "/docs/basics/create-commune", + }, + { + name: "Deploy Module", + url: "/docs/basics/deploy-module", + }, + { + name: "Register Commune", + url: "/docs/basics/register-commune", + }, + { + name: "Namespace", + url: "/docs/basics/namespace", + }, + { + name: "Connect a Module", + url: "/docs/basics/connect-module", + }, + { + name: "PyParse Cli Basics", + url: "/docs/basics/cli-basics", + }, + { + name: "Key Basics", + url: "/docs/basics/key-basics", + }, + ], + }, + { + name: "Modules", + url: "/docs/modules", + submenuItems: [ + { + name: "Module Basics", + url: "/docs/modules/module-basics", + }, + { + name: "Bittensor", + url: "/docs/modules/bittensor", + }, + { + name: "Data-hf", + url: "/docs/modules/data-hf", + }, + { + name: "Model Transformer", + url: "/docs/modules/model-hf", + }, + { + name: "Data text realfakes", + url: "/docs/modules/data-text-realfake", + }, + { + name: "Data text truthqa", + url: "/docs/modules/data-text-truthqa", + }, + { + name: "Translate your site", + url: "/docs/modules/translate-your-site", + }, + { + name: "Model Openai", + url: "/docs/modules/model-openai", + }, + { + name: "Validator", + url: "/docs/modules/validator", + }, + { + name: "Vali text realfake", + url: "/docs/modules/vali-text-realfake", + }, + ], + }, +]; -export default function DocsMenu () { - return ( - - ); -} \ No newline at end of file +export default function DocsMenu() { + return ( + + ); +} diff --git a/frontend/src/app/docs/introduction/page.mdx b/frontend/src/app/docs/introduction/page.mdx index 3a423472..026314d4 100644 --- a/frontend/src/app/docs/introduction/page.mdx +++ b/frontend/src/app/docs/introduction/page.mdx @@ -11,5 +11,5 @@ The overarching goal of Commune is to create a collaborative ecosystem where dev # Socials - Twitter: [@communeaidotorg](https://twitter.com/communeaidotorg) -- Discord: [@commune.ai](https://discord.com/invite/DgjvQXvhqf) -- Website: Comming Soon +- Discord: [@commune.ai](https://discord.gg/communeai) +- Website: [CommuneAi.org](https://www.communeai.org) diff --git a/frontend/src/app/head.tsx b/frontend/src/app/head.tsx index aef47247..819b61c5 100644 --- a/frontend/src/app/head.tsx +++ b/frontend/src/app/head.tsx @@ -1,19 +1,18 @@ -import React from 'react'; -import { useSearchParams } from 'next/navigation'; +import React from "react"; +import { useSearchParams } from "next/navigation"; const Head = () => { - const searchparms = useSearchParams(); - const name = searchparms.get('titlename'); + const name = searchparms.get("titlename"); - const dynamicTitle = name ? `${name} | Commune` : 'Commune'; + const dynamicTitle = name ? `${name} | Commune` : "Commune"; return ( <> {dynamicTitle.charAt(0).toUpperCase() + dynamicTitle.slice(1)} - + );