manage markdowns by path
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useParams } from "react-router-dom";
|
||||
import {fetchWithCache} from "../utils/fetchWithCache";
|
||||
import {fetch_} from "../utils/requestUtils";
|
||||
|
||||
const MarkdownContent = () => {
|
||||
const { id } = useParams();
|
||||
@@ -11,7 +11,10 @@ const MarkdownContent = () => {
|
||||
const [error, setError] = useState(null);
|
||||
|
||||
useEffect(() => {
|
||||
fetchWithCache(`/api/markdown/${id}`)
|
||||
fetch_(`/api/markdown/${id}`, {}, {
|
||||
use_cache: true,
|
||||
use_token: false
|
||||
})
|
||||
.then((data) => setContent(data))
|
||||
.catch((error) => setError(error));
|
||||
}, [id]);
|
||||
|
||||
Reference in New Issue
Block a user