fix: share overview
This commit is contained in:
@@ -12,7 +12,9 @@ export function ShareEnterPassword({ shareId }: { shareId: string }) {
|
||||
const trpc = useTRPC();
|
||||
const mutation = useMutation(
|
||||
trpc.auth.signInShare.mutationOptions({
|
||||
onSuccess() {},
|
||||
onSuccess() {
|
||||
window.location.reload();
|
||||
},
|
||||
onError() {
|
||||
toast.error('Incorrect password');
|
||||
},
|
||||
|
||||
@@ -11,14 +11,13 @@ const FullPageLoadingState = ({
|
||||
<FullPageEmptyState
|
||||
className="min-h-[calc(100vh-theme(spacing.16))]"
|
||||
title={title}
|
||||
description={description}
|
||||
icon={
|
||||
((props) => (
|
||||
<Loader2Icon {...props} className="animate-spin" />
|
||||
)) as LucideIcon
|
||||
}
|
||||
>
|
||||
{description}
|
||||
</FullPageEmptyState>
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ export default function OverviewMetrics({ projectId }: OverviewMetricsProps) {
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="relative -top-0.5 col-span-6 -m-4 mb-0 mt-0 md:m-0">
|
||||
<div className="relative -top-0.5 col-span-6 mb-0 mt-0 md:m-0">
|
||||
<div className="card mb-2 grid grid-cols-4 overflow-hidden rounded-md">
|
||||
{TITLES.map((title, index) => (
|
||||
<OverviewMetricCard
|
||||
|
||||
@@ -19,16 +19,9 @@ interface OverviewShareProps {
|
||||
export function OverviewShare({ projectId }: OverviewShareProps) {
|
||||
const trpc = useTRPC();
|
||||
const query = useQuery(
|
||||
trpc.share.overview.queryOptions(
|
||||
{
|
||||
projectId,
|
||||
},
|
||||
{
|
||||
retry(failureCount, error) {
|
||||
return error.message !== 'Share not found' && failureCount < 3;
|
||||
},
|
||||
},
|
||||
),
|
||||
trpc.share.overview.queryOptions({
|
||||
projectId,
|
||||
}),
|
||||
);
|
||||
const data = query.data;
|
||||
const mutation = useMutation(
|
||||
|
||||
Reference in New Issue
Block a user