Fakultas Ilmu Komputer UI

Commit 873f20c8 authored by Muhammad Fairuzi Teguh's avatar Muhammad Fairuzi Teguh
Browse files

[REFACTOR] add pathPrefix

parent 16f6f05f
Pipeline #48968 passed with stages
in 2 minutes and 44 seconds
......@@ -16,6 +16,8 @@ switch (ENV) {
BASE_API_URL = "http://localhost:8080"
}
export const pathPrefix = ENV === "staging" ? "/staging" : "/"
export const apexOptions = {
chart: {
type: "bar",
......
......@@ -9,6 +9,7 @@ import SEO from "../components/seo"
import Spinner from "../components/spinner"
import { Link } from "gatsby"
import "./article.css"
import { pathPrefix } from "../config"
const Content = props => {
const articleId = props.id
......@@ -92,7 +93,7 @@ const Content = props => {
const Article = () => {
return (
<Router>
<Content path="/article/:id" />
<Content path={pathPrefix + "/article/:id"} />
</Router>
)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment