Skip to content

Instantly share code, notes, and snippets.

View Ernesto-tha-great's full-sized avatar
🏠
Working from home

Ernesto Ernesto-tha-great

🏠
Working from home
View GitHub Profile
"use client";
import { useState } from "react";
import Link from "next/link";
import { useAuth } from "../contexts/AuthContext";
import Login from "./Login";
export default function Navbar() {
const { user, loading, signOut } = useAuth();
const [showLogin, setShowLogin] = useState(false);
"use client";
import { useState } from "react";
import Link from "next/link";
import Login from "./Login";
export default function Navbar() {
const [showLogin, setShowLogin] = useState(false);
return (
"use client";
import { useState } from "react";
export default function Login() {
const [email, setEmail] = useState("");
const [password, setPassword] = useState("");
const [loading, setLoading] = useState(false);
const [mode, setMode] = useState("signin"); // 'signin' or 'signup'
const [message, setMessage] = useState("");
"use client";
import { useState } from "react";
export default function Home() {
const [imageUrl, setImageUrl] = useState("");
const [uploading, setUploading] = useState(false);
const [images, setImages] = useState([]);
const [copySuccess, setCopySuccess] = useState("");
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.22;
import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MyToken is ERC721 {
constructor() ERC721("MyToken", "MTK") {}
}
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@pythnetwork/pyth-sdk-solidity/IPyth.sol";
contract EthBettingDapp {
IPyth public pyth;
bytes32 public ethUsdPriceId;
struct Bet {
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract HotelBooking {
address public owner;
IERC20 public token;
enum RoomCategory { Presidential, Deluxe, Suite }
import * as React from "react";
import deployedContracts from "@celo-composer/hardhat/deployments/hardhat_contracts.json";
import { useCelo } from "@celo/react-celo";
import AppLayout from "@/components/layout/AppLayout";
import { HomePage } from "./HomePage";
export default function App() {
const { network } = useCelo();
const contracts =
import * as React from "react";
import deployedContracts from "@celo-composer/hardhat/deployments/hardhat_contracts.json";
import { useCelo } from "@celo/react-celo";
import AppLayout from "@/components/layout/AppLayout";
import HomePage from "./HomePage";
export default function App() {
const { network } = useCelo();
const contracts =