mirror of
https://github.com/System-End/site.git
synced 2026-04-19 22:05:11 +00:00
Improve query loading on project show page
This commit is contained in:
parent
9d4e6309da
commit
98f43db58a
1 changed files with 3 additions and 11 deletions
|
|
@ -12,7 +12,6 @@ const ProjectShowPage = ({projectID}) => {
|
|||
|
||||
const ErrorMessage = () => (<div>There was an error loading your projects.</div>)
|
||||
|
||||
console.log("projectID", projectID);
|
||||
const [project, setProject] = useState([])
|
||||
const [status, setStatus] = useState('loading')
|
||||
const [errorMsg, setError] = useState(null)
|
||||
|
|
@ -80,14 +79,7 @@ const ProjectShowPage = ({projectID}) => {
|
|||
|
||||
export default ProjectShowPage
|
||||
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: [],
|
||||
fallback: 'blocking'
|
||||
}
|
||||
}
|
||||
export async function getStaticProps({params}) {
|
||||
const { projectID } = params
|
||||
|
||||
export function getServerSideProps(context) {
|
||||
const { projectID } = context.query
|
||||
return { props: { projectID } }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue