[WEB-5271] chore: your work empty state updated #8029

This commit is contained in:
Anmol Singh Bhatia 2025-10-29 13:34:04 +05:30 committed by GitHub
parent 0560849f88
commit 5247fedd23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,9 +2,7 @@ import { observer } from "mobx-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";
// components // components
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import { DetailedEmptyState } from "@/components/empty-state/detailed-empty-state-root"; import { EmptyStateDetailed } from "@plane/propel/empty-state";
// constants
import { useResolvedAssetPath } from "@/hooks/use-resolved-asset-path";
// TODO: If projectViewId changes, everything breaks. Figure out a better way to handle this. // TODO: If projectViewId changes, everything breaks. Figure out a better way to handle this.
export const ProfileViewEmptyState: React.FC = observer(() => { export const ProfileViewEmptyState: React.FC = observer(() => {
@ -12,19 +10,14 @@ export const ProfileViewEmptyState: React.FC = observer(() => {
const { t } = useTranslation(); const { t } = useTranslation();
// store hooks // store hooks
const { profileViewId } = useParams(); const { profileViewId } = useParams();
// derived values
const resolvedPath = useResolvedAssetPath({
basePath: "/empty-state/profile/",
additionalPath: profileViewId?.toString(),
});
if (!profileViewId) return null; if (!profileViewId) return null;
return ( return (
<DetailedEmptyState <EmptyStateDetailed
assetKey="work-item"
title={t(`profile.empty_state.${profileViewId.toString()}.title`)} title={t(`profile.empty_state.${profileViewId.toString()}.title`)}
description={t(`profile.empty_state.${profileViewId.toString()}.description`)} description={t(`profile.empty_state.${profileViewId.toString()}.description`)}
assetPath={resolvedPath}
/> />
); );
}); });