This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 sub = async () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
export default function handler(req, res) { | |
if (req.method === "GET") { | |
// retrieving the search query | |
const search = req.query.search; | |
//filter checks for search query | |
const options = { | |
method: "POST", | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
export default function handler(req, res) { | |
if (req.method === "POST") { | |
// parse incoming request | |
const cred = JSON.parse(req.body); | |
//option object, body contains media file to be uploaded on xata database | |
const options = { | |
method: "POST", | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
export default function handler(req, res) { | |
if (req.method === "POST") { | |
// Parse incoming request body and get the email | |
const email = JSON.parse(req.body).email; | |
// option object, filter checks for email in the database | |
const options = { | |
method: "POST", | |
headers: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction | |
export default function handler(req, res) { | |
if (req.method === "POST") { | |
// parse incoming request | |
const cred = JSON.parse(req.body); | |
// option object for first request, filter checks if email already exists in the database | |
const options1 = { | |
method: "POST", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Head from "next/head"; | |
import styles from "../styles/Home.module.css"; | |
import Sidebar from "../components/Sidebar"; | |
export default function Home() { | |
//The showWidget pops up a cloudinary widget that we can use to upload any file and it returns an object that contains | |
// the name, link to the url of the uploaded file and other information | |
const showWidget = () => { | |
const myWidget = window.cloudinary.createUploadWidget( | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useRef } from "react"; | |
import Link from "next/link"; | |
export default function Signup({ data }) { | |
return ( | |
<div> | |
<div className="form"> | |
<h2 className="white">Signup</h2> | |
<div> | |
<input className="input" placeholder="Enter Email" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, useRef } from "react"; | |
import Link from "next/link"; | |
export default function Login() { | |
return ( | |
<div> | |
<div className="form"> | |
<h2 className="white">Login</h2> | |
<div> | |
<input className="input" placeholder="Enter Email" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import Head from "next/head"; | |
import Image from "next/image"; | |
import styles from "../styles/Home.module.css"; | |
import Sidebar from "../components/Sidebar"; | |
export default function Video() { | |
return ( | |
<div> | |
<Head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useEffect, useState } from "react"; | |
import Head from "next/head"; | |
import Image from "next/image"; | |
import styles from "../styles/Home.module.css"; | |
import Sidebar from "../components/Sidebar"; | |
export default function Photos() { | |
return ( | |
<div> | |
<Head> |