Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
devsisingh committed Aug 26, 2023
1 parent 0bd53a3 commit 69228bb
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
18 changes: 9 additions & 9 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import {
} from "./api/setConnection";
import NoSSR from "./NoSSR";

export async function getServerSideProps() {
const response = await fetch(
'http://localhost:3000/api/getData');
const data = await response.json();
// export async function getServerSideProps() {
// const response = await fetch(
// 'http://localhost:3000/api/getData');
// const data = await response.json();

return {
props: { data: data },
};
}
// return {
// props: { data: data },
// };
// }

export default function Home({ data }) {
const dispatch = useDispatch();
Expand All @@ -37,7 +37,7 @@ export default function Home({ data }) {
return (
<div>
{/* <NoSSR> */}
<Landingpage injectdata={data}/>
<Landingpage/>

{/* </NoSSR> */}

Expand Down
3 changes: 1 addition & 2 deletions pages/landingpage.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ const tradhubAddress = process.env.NEXT_PUBLIC_TRADEHUB_ADDRESS;
const graphqlAPI = process.env.NEXT_PUBLIC_MARKETPLACE_API;
const accessmasterAddress = process.env.NEXT_PUBLIC_ACCESS_MASTER_ADDRESS;

export default function LandingPage({injectdata}) {
console.log("injected Data:", injectdata);
export default function LandingPage() {

// const [userData, setUserData] = useState(null);

Expand Down

0 comments on commit 69228bb

Please sign in to comment.