カスタムデータ入れる枠作成

This commit is contained in:
harukin-OneMix4 2024-01-27 01:35:52 +09:00
parent 431c4c9c0b
commit 8a94b81052

View File

@ -12,6 +12,8 @@ export const useAllTrainDiagram = () => {
export const AllTrainDiagramProvider = ({ children }) => {
const [allTrainDiagram, setAllTrainDiagram] = useState();
const customData = {
};
useEffect(() => {
fetch(
"https://script.google.com/macros/s/AKfycbx_s7RB-xTy-iAslFJg7LfplLV09-hjDXEjdi9kCP_JT45wq17Af_IPOKIOqIfaNDg/exec"
@ -25,7 +27,10 @@ export const AllTrainDiagramProvider = ({ children }) => {
});
return data;
})
.then((res) => setAllTrainDiagram(res));
.then((res) => {
Object.assign(res, customData);
setAllTrainDiagram(res);
});
}, []);
return (