Edit HomePage
This commit is contained in:
+18
-4
@@ -1,9 +1,23 @@
|
||||
import {Button} from '@material-ui/core'
|
||||
import axios from 'axios'
|
||||
|
||||
import Navigasyon from '../components/navigasyon'
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<Button variant='contained' color='primary'>
|
||||
#OKi
|
||||
</Button>
|
||||
<Navigasyon selectedTab={0} />
|
||||
)
|
||||
}
|
||||
|
||||
export async function getServerSideProps() {
|
||||
const mizikResponse = await axios.get(`${process.env.API_URL}/mizik`)
|
||||
const awtisResponse = await axios.get(`${process.env.API_URL}/awtis`)
|
||||
const mizik = mizikResponse.data
|
||||
const awtis = awtisResponse.data
|
||||
|
||||
return {
|
||||
props: {
|
||||
mizik,
|
||||
awtis
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user