Skip to content

Commit

Permalink
fix: process name
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Feb 7, 2024
1 parent f07f390 commit cd6044d
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/components/layout/header/internal/Activity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ const appLabels: { [app: string]: string } = {
}
// autocorrect: true

const getAppName = (processName: string) => {
return appLabels[processName] || processName
}
export const Activity = memo(() => {
const activityConfig = useAppConfigSelector(
(config) => config.module.activity,
Expand Down Expand Up @@ -219,7 +216,6 @@ export const Activity = memo(() => {

const renderDescription =
deferredProcess?.description || appDescription[deferredProcess?.name || '']
const renderProcessName = getAppName(processName)

const memoProcessName = useMemo(
() => ({ processName: processName || '', icon: processIcon }),
Expand All @@ -245,9 +241,9 @@ export const Activity = memo(() => {
)}
{isPageActive && (
<AnimatePresence>
{renderProcessName && (
{processName && (
<m.div
key={renderProcessName}
key={processName}
className="pointer-events-auto absolute bottom-0 right-0 top-0 z-[10] flex items-center overflow-hidden lg:right-[-25px]"
initial={{
opacity: 0.0001,
Expand Down Expand Up @@ -275,7 +271,7 @@ export const Activity = memo(() => {
trackerMessage="Activity"
>
<span className="whitespace-pre-line">
{ownerName} 正在使用 {renderProcessName}
{ownerName} 正在使用 {processName}
{renderDescription ? ` ${renderDescription}` : ''}
</span>
</ImpressionView>
Expand Down

0 comments on commit cd6044d

Please sign in to comment.