Skip to content

Instantly share code, notes, and snippets.

View Josh4324's full-sized avatar

ADESANYA JOSHUA AYODEJI Josh4324

View GitHub Profile
import React, { useEffect, useRef } from "react";
import Header from "../components/Header";
import Map, {
Marker,
NavigationControl,
FullscreenControl,
ScaleControl,
} from "react-map-gl";
import mapboxgl from "mapbox-gl";
import axios from "axios";
@Josh4324
Josh4324 / Contract.sol
Last active March 23, 2023 07:08
Contract.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract SoulBound is ERC721, ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
@Josh4324
Josh4324 / login.js
Created November 1, 2022 15:12
login.js
import React, { useState, useRef } from "react";
import bcrypt from "bcryptjs";
import { NotificationManager } from "react-notifications";
import Link from "next/link";
export default function Login() {
const emailRef = useRef();
const passwordRef = useRef();
const log = () => {
@Josh4324
Josh4324 / signup.js
Created November 1, 2022 15:10
signup.js
import React, { useState, useRef } from "react";
import bcrypt from "bcryptjs";
import { NotificationManager } from "react-notifications";
import Link from "next/link";
export default function Signup({ data }) {
const emailRef = useRef();
const passwordRef = useRef();
const sign = async () => {
@Josh4324
Josh4324 / videos.js
Created November 1, 2022 02:21
videos.js
import React, { useEffect, useState } from "react";
import Head from "next/head";
import styles from "../styles/Home.module.css";
import Sidebar from "../components/Sidebar";
export default function Files() {
const [videos, setVideos] = useState([]);
useEffect(() => {
const user = localStorage.getItem("cloud-user");
if (user === null) {
@Josh4324
Josh4324 / photos.js
Created November 1, 2022 02:19
photos.js
import React, { useEffect, useState } from "react";
import Head from "next/head";
import styles from "../styles/Home.module.css";
import Sidebar from "../components/Sidebar";
export default function Photos() {
const [images, setImages] = useState([]);
useEffect(() => {
const user = localStorage.getItem("cloud-user");
if (user === null) {
@Josh4324
Josh4324 / files.js
Created November 1, 2022 02:17
files.js
import React, { useEffect, useState } from "react";
import Head from "next/head";
import styles from "../styles/Home.module.css";
import Sidebar from "../components/Sidebar";
export default function Files() {
const [documents, setDoc] = useState([]);
useEffect(() => {
const user = localStorage.getItem("cloud-user");
@Josh4324
Josh4324 / all.js
Created November 1, 2022 02:15
all.js
import React, { useEffect, useState } from "react";
import Head from "next/head";
import styles from "../styles/Home.module.css";
import Sidebar from "../components/Sidebar";
export default function All() {
const [all, setAll] = useState([]);
useEffect(() => {
const user = localStorage.getItem("cloud-user");
if (user === null) {
@Josh4324
Josh4324 / index.js
Created November 1, 2022 02:14
index.js
import Head from "next/head";
import styles from "../styles/Home.module.css";
import Sidebar from "../components/Sidebar";
import { NotificationManager } from "react-notifications";
import { useState, useEffect, useRef } from "react";
export default function Home() {
const [images, setImages] = useState([]);
const [documents, setDoc] = useState([]);
const [videos, setVideos] = useState([]);
@Josh4324
Josh4324 / login.js
Created November 1, 2022 02:12
login.js
import React, { useState, useRef } from "react";
import bcrypt from "bcryptjs";
import { NotificationManager } from "react-notifications";
import Link from "next/link";
export default function Login() {
const emailRef = useRef();
const passwordRef = useRef();
const sub = () => {