カスタムデータ入れる枠作成
This commit is contained in:
parent
431c4c9c0b
commit
8a94b81052
@ -12,6 +12,8 @@ export const useAllTrainDiagram = () => {
|
|||||||
|
|
||||||
export const AllTrainDiagramProvider = ({ children }) => {
|
export const AllTrainDiagramProvider = ({ children }) => {
|
||||||
const [allTrainDiagram, setAllTrainDiagram] = useState();
|
const [allTrainDiagram, setAllTrainDiagram] = useState();
|
||||||
|
const customData = {
|
||||||
|
};
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
fetch(
|
fetch(
|
||||||
"https://script.google.com/macros/s/AKfycbx_s7RB-xTy-iAslFJg7LfplLV09-hjDXEjdi9kCP_JT45wq17Af_IPOKIOqIfaNDg/exec"
|
"https://script.google.com/macros/s/AKfycbx_s7RB-xTy-iAslFJg7LfplLV09-hjDXEjdi9kCP_JT45wq17Af_IPOKIOqIfaNDg/exec"
|
||||||
@ -25,7 +27,10 @@ export const AllTrainDiagramProvider = ({ children }) => {
|
|||||||
});
|
});
|
||||||
return data;
|
return data;
|
||||||
})
|
})
|
||||||
.then((res) => setAllTrainDiagram(res));
|
.then((res) => {
|
||||||
|
Object.assign(res, customData);
|
||||||
|
setAllTrainDiagram(res);
|
||||||
|
});
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
Loading…
Reference in New Issue
Block a user