mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 09:14:46 +01:00
update column width md screens (#4392)
Co-authored-by: kunal <kunal@Kunals-iMac.hsd1.ca.comcast.net>
This commit is contained in:
parent
4fdb400e9b
commit
a60767e003
@ -56,7 +56,7 @@ function InsightPane({
|
||||
{loading && <Loading />}
|
||||
{data &&
|
||||
data.map((insight: DashboardItemType, index: number) => (
|
||||
<Col xs={24} sm={data.length > 1 ? 8 : 12} key={insight.id} style={{ height: 270 }}>
|
||||
<Col xs={24} sm={12} md={data.length > 1 ? 8 : 12} key={insight.id} style={{ height: 270 }}>
|
||||
<DashboardItem
|
||||
item={{ ...insight, color: null }}
|
||||
key={insight.id + '_user'}
|
||||
|
@ -167,7 +167,7 @@
|
||||
max-width: 900px;
|
||||
}
|
||||
@media only screen and (max-width: $md) {
|
||||
max-width: 650px;
|
||||
max-width: 600px;
|
||||
}
|
||||
@media only screen and (max-width: $sm) {
|
||||
max-width: 315px;
|
||||
|
@ -166,12 +166,20 @@ function RecentInsightList(): JSX.Element {
|
||||
}
|
||||
|
||||
export function DiscoverInsightsModule(): JSX.Element {
|
||||
const { insights, insightsLoading, teamInsights, teamInsightsLoading } = useValues(insightHistoryLogic)
|
||||
const { loadInsights, loadTeamInsights } = useActions(insightHistoryLogic)
|
||||
const {
|
||||
insights,
|
||||
insightsLoading,
|
||||
teamInsights,
|
||||
teamInsightsLoading,
|
||||
savedInsights,
|
||||
savedInsightsLoading,
|
||||
} = useValues(insightHistoryLogic)
|
||||
const { loadInsights, loadTeamInsights, loadSavedInsights } = useActions(insightHistoryLogic)
|
||||
|
||||
useEffect(() => {
|
||||
loadInsights()
|
||||
loadTeamInsights()
|
||||
loadSavedInsights()
|
||||
}, [])
|
||||
|
||||
return (
|
||||
@ -181,10 +189,19 @@ export function DiscoverInsightsModule(): JSX.Element {
|
||||
</Title>
|
||||
<Divider />
|
||||
<Skeleton
|
||||
loading={insightsLoading && insights.length === 0 && teamInsightsLoading && teamInsights.length === 0}
|
||||
loading={
|
||||
insightsLoading &&
|
||||
insights.length === 0 &&
|
||||
teamInsightsLoading &&
|
||||
teamInsights.length === 0 &&
|
||||
savedInsightsLoading &&
|
||||
savedInsights.length === 0
|
||||
}
|
||||
>
|
||||
<Space direction={'vertical'} className={'home-page'} size={'small'}>
|
||||
{(insights.length > 0 || teamInsights.length > 0) && <RecentInsightList />}
|
||||
{(insights.length > 0 || teamInsights.length > 0 || savedInsights.length > 0) && (
|
||||
<RecentInsightList />
|
||||
)}
|
||||
<CreateAnalysisSection />
|
||||
</Space>
|
||||
</Skeleton>
|
||||
|
Loading…
Reference in New Issue
Block a user