diff --git a/pages/article/[id].jsx b/pages/article/[id].jsx
index d236b31..a194a23 100644
--- a/pages/article/[id].jsx
+++ b/pages/article/[id].jsx
@@ -156,11 +156,8 @@ export const getStaticProps = async(context) => {
}
export const getStaticPaths = async(context) => {
- const id = context.param.id
return {
- paths: [
- { params: { id: id}},
- ],
- fallback: true
+ paths: [], //indicates that no page needs be created at build time
+ fallback: 'blocking' //indicates the type of fallback
}
-}
\ No newline at end of file
+}
diff --git a/pages/index.jsx b/pages/index.jsx
index 2b60341..5bde279 100644
--- a/pages/index.jsx
+++ b/pages/index.jsx
@@ -3,6 +3,7 @@ import Image from "next/image"
import axios from 'axios'
import Footer from '../components/Layout/Footer'
import CreatedPost from "../components/Post/CreatedPost"
+import AlertModal from "../components/Common/AlertModal"
export default function Home() {
@@ -12,6 +13,19 @@ export default function Home() {
state: "latest",
keyword: search
})
+ const [isMobile, setIsMobile] = useState(false);
+
+ const handleResize = () => {
+ if (window.innerWidth < 640) {
+ setIsMobile(true)
+ } else {
+ setIsMobile(false)
+ }
+ }
+
+ useEffect(() => {
+ window.addEventListener("resize", handleResize)
+ })
useEffect(() => {
getArticles(queryState.state, queryState.keyword)
@@ -61,12 +75,14 @@ export default function Home() {
}
return (
-
- Hello
- {/*
+
+ {
+ (isMobile) &&
+ }
+
Get started with Up-road
What are you looking up-to?
-
+
-
+
-
+
{
articles.map((article, index) => {
return (