Skip to content

Commit

Permalink
serversiderendering
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgarJMesquita committed Sep 1, 2021
1 parent 9c8ec0d commit 4534998
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pages/leaderboard.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// React
import { useEffect } from 'react';
// Next
import { GetStaticProps } from 'next';
import { GetServerSideProps, GetStaticProps } from 'next';
import Head from 'next/head';
// Components
import { NavBar } from '../components/NavBar';
Expand Down Expand Up @@ -87,7 +87,7 @@ export default function Ranking({leaderboard}:LeaderBoardProps){



export const getStaticProps:GetStaticProps = async()=>{
/* export const getStaticProps:GetStaticProps = async()=>{
const docRef = collection(database,'leaderboard');
const docQuery = query(docRef, orderBy('level','desc'), orderBy('experience','desc'), limit(50));
Expand All @@ -113,8 +113,8 @@ export const getStaticProps:GetStaticProps = async()=>{
},
revalidate: 10
}
}
/*
} */

export const getServerSideProps:GetServerSideProps = async()=>{

const docRef = collection(database,'leaderboard');
Expand All @@ -139,4 +139,4 @@ export const getServerSideProps:GetServerSideProps = async()=>{
leaderboard: null
}
}
} */
}

1 comment on commit 4534998

@vercel
Copy link

@vercel vercel bot commented on 4534998 Sep 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.