Changeset 2998dc4 for reactapp/src/Pages
- Timestamp:
- 07/30/22 15:39:04 (2 years ago)
- Branches:
- main
- Children:
- e958037
- Parents:
- 3a44163
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/src/Pages/Professor.js
r3a44163 r2998dc4 1 1 import React, { useEffect, useState } from "react"; 2 2 import { Outlet, useParams } from "react-router-dom"; 3 import JSOG from "jsog"; 3 4 import OpinionTree from "../Components/OpinionTree"; 4 5 … … 15 16 try { 16 17 const response = await fetch(url); 17 const json = await response.json(); 18 setProfessor(json); 18 var cyclicGraph = await response.json(); 19 var jsogStructure = JSOG.encode(cyclicGraph); // has { '@ref': 'ID' } links instead of cycles 20 cyclicGraph = JSOG.decode(jsogStructure); 21 setProfessor(cyclicGraph); 19 22 setLoaded(true); 20 23 } catch (error) {
Note:
See TracChangeset
for help on using the changeset viewer.