@bufferapp/report-list
Advanced tools
Comparing version 1.75.2 to 1.77.0
import React, { useEffect } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import styled from 'styled-components'; | ||
import { useUser } from '@bufferapp/app-shell'; | ||
import { useAccount } from '@bufferapp/analyze-account'; | ||
import { ChartStateLoading as Loading, EmptyState, } from '@bufferapp/analyze-shared-components'; | ||
@@ -22,8 +22,8 @@ import Report from '../Report'; | ||
const ReportList = ({ loading, reports, selectReport, removeReport, small, fetch }) => { | ||
const user = useUser(); | ||
const account = useAccount(); | ||
useEffect(function fetchReports() { | ||
if (user.currentOrganization.id) { | ||
fetch(user.currentOrganization.id); | ||
if (account?.currentOrganization?.id) { | ||
fetch(account?.currentOrganization?.id); | ||
} | ||
}, [user.currentOrganization.id]); | ||
}, [account]); | ||
@@ -30,0 +30,0 @@ return (loading ? |
{ | ||
"name": "@bufferapp/report-list", | ||
"version": "1.75.2", | ||
"version": "1.77.0", | ||
"description": "Report list package for Analyze", | ||
@@ -13,3 +13,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"@bufferapp/analyze-shared-components": "^1.75.2" | ||
"@bufferapp/analyze-shared-components": "^1.77.0" | ||
}, | ||
@@ -25,3 +25,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "ac8e89fc28e8498c6e90f2c14a68fcceccfebf69" | ||
"gitHead": "975cf467d03ca2ef0c494d7c77893343ca0b968c" | ||
} |
60032
24
832