33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { useLocation } from "react-router";
|
|
import { t as i18nT } from "i18next";
|
|
import EmptyState from "./EmptyState";
|
|
|
|
export default function PreviewEmptyStates() {
|
|
const currentRoute = useLocation().pathname;
|
|
return (
|
|
<div id="empty-states" className="space-y-1">
|
|
<div className="border-border bg-background border border-dashed p-6">
|
|
<div className="w-full space-y-2">
|
|
<EmptyState
|
|
onClick={() => alert(i18nT("components.emptyState.preview.clicked"))}
|
|
captions={{
|
|
new: i18nT("components.emptyState.preview.button"),
|
|
thereAreNo: i18nT("components.emptyState.preview.thereAreNo"),
|
|
description: i18nT("components.emptyState.preview.description"),
|
|
}}
|
|
icon="plus"
|
|
/>
|
|
<EmptyState
|
|
to={currentRoute}
|
|
captions={{
|
|
new: i18nT("components.emptyState.preview.link"),
|
|
thereAreNo: i18nT("components.emptyState.preview.thereAreNo"),
|
|
description: i18nT("components.emptyState.preview.description"),
|
|
}}
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|