File tree Expand file tree Collapse file tree 3 files changed +39
-7
lines changed
(user)/publishers/components
dashboard/[entityType]/[entitySlug]/usecases Expand file tree Collapse file tree 3 files changed +39
-7
lines changed Original file line number Diff line number Diff line change 11import { useParams } from 'next/navigation' ;
22import { graphql } from '@/gql' ;
33import { useQuery } from '@tanstack/react-query' ;
4- import { Card , Spinner } from 'opub-ui' ;
4+ import { Card , Icon , Spinner , Text } from 'opub-ui' ;
55
66import { GraphQL } from '@/lib/api' ;
77import { cn } from '@/lib/utils' ;
@@ -140,8 +140,7 @@ const Datasets = ({ type }: { type: 'organization' | 'Publisher' }) => {
140140 < div className = " flex w-fit justify-center rounded-2 bg-surfaceDefault p-4" >
141141 < Spinner />
142142 </ div >
143- ) : (
144- DatasetData ?. length > 0 &&
143+ ) : DatasetData ?. length > 0 ? (
145144 DatasetData ?. map ( ( item : any , index : any ) => (
146145 < Card
147146 type = { [
@@ -194,6 +193,23 @@ const Datasets = ({ type }: { type: 'organization' | 'Publisher' }) => {
194193 href = { `/datasets/${ item . id } ` }
195194 />
196195 ) )
196+ ) : (
197+ < >
198+ < div className = "flex h-full w-full grow flex-col items-center justify-center rounded-2 bg-white p-10" >
199+ < div className = { 'h-100 flex flex-col items-center gap-4' } >
200+ < Icon
201+ source = { Icons . addDataset }
202+ color = "interactive"
203+ stroke = { 1 }
204+ size = { 80 }
205+ />
206+
207+ < Text variant = "headingSm" color = "subdued" >
208+ No datasets published yet
209+ </ Text >
210+ </ div >
211+ </ div >
212+ </ >
197213 ) }
198214 </ div >
199215 </ div >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from 'react';
22import { useParams } from 'next/navigation' ;
33import { graphql } from '@/gql' ;
44import { useQuery } from '@tanstack/react-query' ;
5- import { Card , Spinner } from 'opub-ui' ;
5+ import { Card , Icon , Spinner , Text } from 'opub-ui' ;
66
77import { GraphQL } from '@/lib/api' ;
88import { cn , formatDate } from '@/lib/utils' ;
@@ -124,8 +124,7 @@ const UseCases = ({ type }: { type: 'organization' | 'Publisher' }) => {
124124 < div className = " flex w-fit justify-center rounded-2 bg-surfaceDefault p-4" >
125125 < Spinner />
126126 </ div >
127- ) : (
128- UseCaseData ?. length > 0 &&
127+ ) : UseCaseData ?. length > 0 ? (
129128 UseCaseData ?. map ( ( item : any , index : any ) => (
130129 < Card
131130 type = { [
@@ -173,6 +172,23 @@ const UseCases = ({ type }: { type: 'organization' | 'Publisher' }) => {
173172 variation = { 'collapsed' }
174173 />
175174 ) )
175+ ) : (
176+ < >
177+ < div className = "flex h-full w-full grow flex-col items-center justify-center rounded-2 bg-white p-10" >
178+ < div className = { 'h-100 flex flex-col items-center gap-4' } >
179+ < Icon
180+ source = { Icons . light }
181+ color = "interactive"
182+ stroke = { 1 }
183+ size = { 80 }
184+ />
185+
186+ < Text variant = "headingSm" color = "subdued" >
187+ No use cases published yet
188+ </ Text >
189+ </ div >
190+ </ div >
191+ </ >
176192 ) }
177193 </ div >
178194 </ div >
Original file line number Diff line number Diff line change @@ -283,7 +283,7 @@ export default function DatasetPage({
283283 className = { twMerge ( 'h-100 flex flex-col items-center gap-4' ) }
284284 >
285285 < Icon
286- source = { Icons . addDataset }
286+ source = { Icons . light }
287287 color = "interactive"
288288 stroke = { 1 }
289289 size = { 80 }
You can’t perform that action at this time.
0 commit comments