Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: AppHeader/mobile の内部処理を整理する vol.1 #5392

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

AtsushiM
Copy link
Member

関連URL

概要

変更内容

確認方法

@yagimushi yagimushi force-pushed the chore-refactoring-AppHeader-mobile branch 2 times, most recently from 1196c3d to 6a186de Compare February 18, 2025 00:28
@yagimushi yagimushi force-pushed the chore-refactoring-AppHeader-mobile branch from 6a186de to 032a8d2 Compare February 18, 2025 00:37
Copy link

pkg-pr-new bot commented Feb 18, 2025

Open in Stackblitz

npm i https://pkg.pr.new/kufu/smarthr-ui@5392

commit: cfeb9f0

})
}

const looseSearchQuery = normalize(searchQuery)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

normalizeは1文字ずつ変換処理を行うため、かなり重い処理になります。
元々のロジックではlooseIncludeで毎回変換が行われていたため事前に変換処理を行います

Comment on lines +14 to +18
if (firstName && lastName) {
return `${lastName} ${firstName}${empCode ? `(${empCode})` : ''}`
}

return (
(firstName && lastName ? `${lastName} ${firstName}` + empCodeStr : empCode ? empCode : email) ??
''
)
return empCode || email || ''
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

元のロジックでは不必要なempCodeStrが生成される場合があったため、条件分岐で整理しています

@AtsushiM AtsushiM marked this pull request as ready for review February 25, 2025 23:07
@AtsushiM AtsushiM requested a review from a team as a code owner February 25, 2025 23:07
@AtsushiM AtsushiM requested review from misako0927 and nabeliwo and removed request for a team February 25, 2025 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant