website refactor
This commit is contained in:
37
apps/website/templates/shared/StatusTemplates.tsx
Normal file
37
apps/website/templates/shared/StatusTemplates.tsx
Normal file
@@ -0,0 +1,37 @@
|
||||
'use client';
|
||||
|
||||
import { SharedContainer, SharedStack, SharedText } from '@/components/shared/UIComponents';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
interface ErrorTemplateProps extends TemplateProps<ViewData> {
|
||||
message?: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export function ErrorTemplate({ message = "An error occurred", description = "Please try again later" }: ErrorTemplateProps) {
|
||||
return (
|
||||
<SharedContainer size="lg">
|
||||
<SharedStack align="center" gap={4} py={12}>
|
||||
<SharedText color="text-red-400">{message}</SharedText>
|
||||
<SharedText color="text-gray-400">{description}</SharedText>
|
||||
</SharedStack>
|
||||
</SharedContainer>
|
||||
);
|
||||
}
|
||||
|
||||
interface EmptyTemplateProps extends TemplateProps<ViewData> {
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
||||
|
||||
export function EmptyTemplate({ title, description }: EmptyTemplateProps) {
|
||||
return (
|
||||
<SharedContainer size="lg">
|
||||
<SharedStack align="center" gap={2} py={12}>
|
||||
<SharedText size="xl" weight="semibold" color="text-white">{title}</SharedText>
|
||||
<SharedText color="text-gray-400">{description}</SharedText>
|
||||
</SharedStack>
|
||||
</SharedContainer>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user