2025-01-07 02:29:29 +08:00
|
|
|
|
'use client';
|
|
|
|
|
|
2025-02-20 10:39:03 +08:00
|
|
|
|
import React from 'react';
|
2025-02-01 02:04:49 +08:00
|
|
|
|
import { ShareAssetType } from '@/api/asset_interfaces';
|
2025-01-07 02:29:29 +08:00
|
|
|
|
import { BusterLogo } from '@/assets/svg/BusterLogo';
|
2025-03-02 14:05:55 +08:00
|
|
|
|
import { Title } from '@/components/ui/typography';
|
2025-01-07 02:29:29 +08:00
|
|
|
|
import { useBusterNotifications } from '@/context/BusterNotifications';
|
|
|
|
|
import { BusterRoutes, createBusterRoute } from '@/routes';
|
2025-03-08 07:02:56 +08:00
|
|
|
|
import { Button } from '@/components/ui/buttons';
|
2025-01-07 02:29:29 +08:00
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
|
|
|
|
|
export const AppNoPageAccess: React.FC<{
|
2025-02-01 02:04:49 +08:00
|
|
|
|
asset_type: ShareAssetType;
|
2025-02-01 06:21:50 +08:00
|
|
|
|
metricId?: string;
|
2025-01-07 02:29:29 +08:00
|
|
|
|
dashboardId?: string;
|
2025-02-20 10:39:03 +08:00
|
|
|
|
}> = React.memo(({ asset_type }) => {
|
2025-01-07 02:29:29 +08:00
|
|
|
|
const { openInfoMessage } = useBusterNotifications();
|
|
|
|
|
|
|
|
|
|
return (
|
2025-02-19 13:43:51 +08:00
|
|
|
|
<div className="flex h-[85vh] w-full flex-col items-center justify-center space-y-6">
|
2025-01-07 02:29:29 +08:00
|
|
|
|
<BusterLogo className="h-16 w-16" />
|
|
|
|
|
|
|
|
|
|
<div className="max-w-[340px] text-center">
|
|
|
|
|
<Title
|
2025-03-02 14:05:55 +08:00
|
|
|
|
as="h2"
|
2025-03-08 07:02:56 +08:00
|
|
|
|
className="text-center">{`It looks like you don’t have access to this file...`}</Title>
|
2025-01-07 02:29:29 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="flex space-x-2">
|
|
|
|
|
<Button
|
|
|
|
|
onClick={() => {
|
|
|
|
|
openInfoMessage('Requesting access is not currently supported');
|
|
|
|
|
}}>
|
|
|
|
|
Request access
|
|
|
|
|
</Button>
|
|
|
|
|
<Link
|
|
|
|
|
href={createBusterRoute({
|
|
|
|
|
route: BusterRoutes.ROOT
|
|
|
|
|
})}>
|
|
|
|
|
<Button>Go back</Button>
|
|
|
|
|
</Link>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
AppNoPageAccess.displayName = 'AppNoPageAccess';
|