import React, { useState, useEffect } from "react"; import theme from "../theme.jsx"; import { Paper, Typography, Divider, Button, Grid, Card, Switch, } from "@mui/material"; import Priority from "../components/Priority.jsx"; //import { useAlert const Priorities = (props) => { const { globalUrl, userdata, serverside, billingInfo, stripeKey, checkLogin, setAdminTab, setCurTab, } = props; const [showDismissed, setShowDismissed] = React.useState(false); const [showRead, setShowRead] = React.useState(false); const [appFramework, setAppFramework] = React.useState({}); useEffect(() => { getFramework() }, []) if (userdata === undefined || userdata === null) { return } const getFramework = () => { fetch(globalUrl + "/api/v1/apps/frameworkConfiguration", { method: "GET", headers: { "Content-Type": "application/json", Accept: "application/json", }, credentials: "include", }) .then((response) => { if (response.status !== 200) { console.log("Status not 200 for framework!"); } return response.json(); }) .then((responseJson) => { if (responseJson.success === false) { setAppFramework({}) if (responseJson.reason !== undefined) { //toast("Failed loading: " + responseJson.reason) } else { //toast("Failed to load framework for your org.") } } else { setAppFramework(responseJson) } }) .catch((error) => { console.log("err in framework: ", error.toString()); }) } return (

Suggestions

Suggestions are tasks identified by Shuffle to help you discover ways to protect your and customers' company. These range from simple configurations in Shuffle to Usecases you may have missed.  Learn more
{ setShowDismissed(!showDismissed); }} />  Show dismissed {userdata.priorities === null || userdata.priorities === undefined || userdata.priorities.length === 0 ? No Suggestions found : userdata.priorities.map((priority, index) => { if (showDismissed === false && priority.active === false) { return null } return ( ) }) }

Notifications

Notifications help you find potential problems with your workflows and apps.  Learn more
{ setShowRead(!showRead); }} />  Show read
) } export default Priorities;