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

refactor: Update Header component to use resolvedTheme instead of theme #140

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

ttizze
Copy link
Owner

@ttizze ttizze commented Aug 1, 2024

Summary by CodeRabbit

## リリースノート

### Refactor
- `Header`コンポーネント内で、テーマの取得方法を`theme`から`resolvedTheme`に変更しました。これにより、画像のソースが`/title-logo-${resolvedTheme || "light"}.png`に更新されました。

@ttizze ttizze merged commit 22cee2a into main Aug 1, 2024
5 checks passed
Copy link

github-actions bot commented Aug 1, 2024

Image description CodeRabbit

## ウォークスルー
全体の変更は、`Header`コンポーネント内でテーマを取得するフックの使用方法を更新し、画像ソースの動的な決定に影響を与えるものです。

## 変更点

| ファイル | 要約 |
| --- | --- |
| web/app/components/Header.tsx | `useTheme`フックから取得するテーマを`theme`から`resolvedTheme`に変更し、画像ソースを`/title-logo-${resolvedTheme || "light"}.png`に更新。 |

Uplevel your code reviews with CodeRabbit Pro

CodeRabbit Pro

If you like this project, please support us by purchasing the Pro version. The Pro version has advanced context, superior noise reduction and several proprietary improvements compared to the open source version. Moreover, CodeRabbit Pro is free for open source projects.

@ttizze ttizze deleted the fix/header branch August 1, 2024 12:19
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Image description CodeRabbit

Commits Files that changed from the base of the PR and between 4d09963 and 36dd28d commits.
Files selected (1)
  • web/app/components/Header.tsx (1)
Review comments generated (2)
  • Review: 1
  • LGTM: 1

Tips

Chat with Image description CodeRabbit Bot (@coderabbitai)

  • Reply on review comments left by this bot to ask follow-up questions. A review comment is a comment on a diff or a file.
  • Invite the bot into a review comment chain by tagging @coderabbitai in a reply.

Code suggestions

  • The bot may make code suggestions, but please review them carefully before committing since the line number ranges may be misaligned.
  • You can edit the comment made by the bot and manually tweak the suggestion if it is slightly off.

Pausing incremental reviews

  • Add @coderabbitai: ignore anywhere in the PR description to pause further reviews from the bot.


return (
<header className="shadow-sm mb-10 z-10 ">
<div className="max-w-7xl mx-auto py-4 px-4 sm:px-6 lg:px-8 flex justify-between items-center">
<Link to="/">
<img
src={`/title-logo-${theme || "light"}.png `}
src={`/title-logo-${resolvedTheme || "light"}.png `}
Copy link

Choose a reason for hiding this comment

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

Image description CodeRabbit

スペースが余分に含まれています。修正してください。

- 						src={`/title-logo-${resolvedTheme || "light"}.png `}
+ 						src={`/title-logo-${resolvedTheme || "light"}.png`}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant