-
-
Notifications
You must be signed in to change notification settings - Fork 857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add notification to admin dash if no stats generated yet #346
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<TotalSignupsCard dailyStats={stats?.dailyStats} isLoading={isLoading} /> | ||
</div> | ||
<div className='relative'> | ||
<div className={`${!stats ? 'opacity-25' : ''}`}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend using clsx
(and maybe twMerge
alongside it) so you can write this more easily:
<div className={cn({
opacity-25: !stats,
})}>
...
</div>
This enables you to compose styles in an object and then the clsx
gives you the final string. It's easier to write and read IMHO.
ShadCN packs it into a cn
helper fn:
import { clsx, type ClassValue } from "clsx"
import { twMerge } from "tailwind-merge"
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we actually alread have the cn helper function i just forgot to use it :)
@vincanger you merged, but did you hide the Stripe test purchases banner? |
@infomiho no I just left it becuase its only for opensaas.sh and for that we have a lot stats data in the db |
@vincanger Makes sense, but it still feels little dirty not to hide it in case we don't have any data. I know we have it, but you know, to make this as nice as possible of an implementation :) |
ok I fixed it and pushed to |
Description
Contributor Checklist