1st push
This commit is contained in:
parent
501d8a8d8e
commit
3226975910
76 changed files with 48623 additions and 3401 deletions
35
pages/content.js
Normal file
35
pages/content.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import Head from "next/head"
|
||||
import React, { useContext, useEffect, useState } from "react"
|
||||
import MyButton from "../components/button"
|
||||
import Header from "../components/headbar"
|
||||
import Logincomponent from "../components/logincomponent"
|
||||
import Signupcomponent from "../components/signupcomponent"
|
||||
|
||||
export default function Content(props) {
|
||||
const [isloaded, setIsLoaded] = React.useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
if (!isloaded) {
|
||||
console.log("isloaded called")
|
||||
|
||||
setIsLoaded(true)
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
/**This place should be used to get any information from the server side
|
||||
* example : we need to get the session token
|
||||
* or any thing related to the page */
|
||||
export async function getServerSideProps() {
|
||||
const data = await fetch("https://jsonplaceholder.typicode.com/todos").then((response) => {
|
||||
response.json()
|
||||
})
|
||||
|
||||
return { props: { title: "rahul" } }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue