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

Add Scroll to Top button to improve page navigation. #1266

Merged
merged 3 commits into from
Dec 29, 2024

Conversation

iBerserker89
Copy link
Contributor

Hi, i made a scroll-to-top button to improve navigation. This is my first contribution to a real open source project and hope it is good enough.

@scraly
Copy link
Owner

scraly commented Dec 28, 2024

Hi,
thanks for the PR :)

My remark:
The components are in a folder:
image

It should be good to keep the coherence and have all the components inside its folder.

@iBerserker89
Copy link
Contributor Author

Sorry for the lack of attention. I just refactored the code.

Copy link
Owner

@scraly scraly left a comment

Choose a reason for hiding this comment

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

Thanks.
After analyzed it deeply, I found two last things to change to keep consistency :).

After that I will approve and merge your PR.

page/src/App.jsx Outdated
@@ -9,26 +8,27 @@ import { DatePage } from 'routes/datepage';
import { MapPage } from 'routes/mappage';
import { ListPage } from 'routes/listpage';
import { FilterContext } from 'contexts/FilterContext';
import ScrollToTopButton from './components/ScrollToTopButton/ScrollToTopButton';
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
import ScrollToTopButton from './components/ScrollToTopButton/ScrollToTopButton';
import { ScrollToTopButton } from './components/ScrollToTopButton/ScrollToTopButton';

import React, { useState, useEffect } from 'react';
import 'styles/ScrollToTopButton.css';

const ScrollToTopButton = () => {
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
const ScrollToTopButton = () => {
export const ScrollToTopButton = () => {

);
};

export default ScrollToTopButton;
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
export default ScrollToTopButton;

@iBerserker89
Copy link
Contributor Author

Just made the suggested changes. Hope it is all good now.

@scraly
Copy link
Owner

scraly commented Dec 29, 2024

Thanks! :-)

@scraly scraly merged commit 55a8f9b into scraly:main Dec 29, 2024
5 checks passed
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.

2 participants