Skip to content

fix(prevent-full-reload): by changing a tag with Link tag (#i258)#259

Merged
DianaLease merged 5 commits intoaccordproject:mainfrom
sahilkhan117:sahilkhan117/i258/fix-prevent-full-reloading
Mar 17, 2025
Merged

fix(prevent-full-reload): by changing a tag with Link tag (#i258)#259
DianaLease merged 5 commits intoaccordproject:mainfrom
sahilkhan117:sahilkhan117/i258/fix-prevent-full-reloading

Conversation

@sahilkhan117
Copy link
Contributor

@sahilkhan117 sahilkhan117 commented Mar 16, 2025

Closes #258

This PR fixes the issue where clicking the logo caused a full page reload instead of a smooth React Router navigation.

Summary

This pull request addresses the issue where clicking the logo caused a full page reload. By replacing the <a href="/"> element with <Link to="/"> from react-router-dom, the navigation is now handled smoothly without reloading the page, preserving the React state and ensuring a better user experience.

@DianaLease please review my PR and Let me know if there is any changes or corrections regarding this problem.

Changes

  1. Replaced <a href="/"> with <Link to="/"> from react-router-dom.
  2. Ensured that the styling and structure of the logo remain intact.
  3. Prevented unnecessary reloading of the page, preserving React state.

New Code

<Link
  to="/"
  style={{ display: "flex", alignItems: "center" }}
  >
  <Image
  	src={screens.lg ? "/logo.png" : "/accord_logo.png"}
  	alt="Template Playground"
  	preview={false}
  	style={{
  		paddingRight: screens.md ? "24px" : "10px",
  		height: "26px",
  		maxWidth: screens.md ? "184.17px" : "36.67px",
  	}}
  />
  <span style={{ color: "white" }}>Template Playground</span>
</Link>

Flags

  • Ensured this change does not break existing navigation behavior.
  • Verified that the logo click now works without triggering a full reload.

Resolved Problem Video Demo

solution-reloading

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Commits messages follow AP format.
  • Merging to main from fork:sahilkhan117/i258/fix-logo-reload.

…oading (#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
…oading (#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
@sahilkhan117 sahilkhan117 requested a review from a team as a code owner March 16, 2025 08:35
@netlify
Copy link

netlify bot commented Mar 16, 2025

Deploy Preview for ap-template-playground ready!

Name Link
🔨 Latest commit f75b826
🔍 Latest deploy log https://app.netlify.com/sites/ap-template-playground/deploys/67d68d4c11fc520008ee8b33
😎 Deploy Preview https://deploy-preview-259--ap-template-playground.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sahilkhan117
Copy link
Contributor Author

@DianaLease please review my PR and Let me know if there is any changes or corrections regarding this problem.

@sahilkhan117 sahilkhan117 changed the title Sahilkhan117/i258/fix prevent full reloading (#i258) fix(prevent-full-reload): by changing a tag with Link tag (#i258) Mar 16, 2025
@DianaLease DianaLease merged commit 96710f2 into accordproject:main Mar 17, 2025
7 checks passed
surya4419 pushed a commit to surya4419/template-playground that referenced this pull request Mar 17, 2025
…cordproject#259)

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

---------

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
surya4419 pushed a commit to surya4419/template-playground that referenced this pull request Mar 17, 2025
…cordproject#259)

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

---------

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
Signed-off-by: surya4419 <suryaa4419@gmail.com>
surya4419 pushed a commit to surya4419/template-playground that referenced this pull request Mar 17, 2025
…cordproject#259)

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

---------

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
surya4419 pushed a commit to surya4419/template-playground that referenced this pull request Mar 17, 2025
…cordproject#259)

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

---------

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
Signed-off-by: surya4419 <suryaa4419@gmail.com>
teja-pola pushed a commit to teja-pola/template-playground that referenced this pull request Mar 18, 2025
…cordproject#259)

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

---------

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
codeAntu pushed a commit to codeAntu/template-playground that referenced this pull request Mar 18, 2025
…cordproject#259)

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#250)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): Replace <a> tag with <Link> tag to prevent full reloading (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

* fix(full-reload): rel attribute is unnecessary for internal links (accordproject#258)

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>

---------

Signed-off-by: Sahil Khan <sahilkhan123098p@gmail.com>
Signed-off-by: Ananta <codeantu@gmail.com>
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.

Bug: On Logo Click the page is full Reload instead of react navigating

2 participants