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(components/button): move back to top button to layout #8

Merged
merged 1 commit into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/web/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import '@fontsource-variable/jetbrains-mono/wght-italic.css';
import '@fontsource-variable/jetbrains-mono';

import ErrorBoundary from '../src/web/components/error/boundary';

import Layout from '../src/web/components/layout';
import BackToTop from '../src/web/components/button/back-to-top';

const App = (props: AppProps) => {
const font = 'JetBrains Mono Variable';
Expand All @@ -30,6 +30,7 @@ const App = (props: AppProps) => {
<CssVarsProvider theme={theme} defaultMode="dark">
<ErrorBoundary>
<Layout>
<BackToTop />
<props.Component {...props.pageProps} />
<script
type="module"
Expand Down
2 changes: 0 additions & 2 deletions apps/web/pages/elements/[name]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import data from '../../../src/web/generated/data';
import Seo from '../../../src/web/components/seo';
import BohrTwoDimensional from '../../../src/web/components/bohr/two-dimensional';
import BohrThreeDimensional from '../../../src/web/components/bohr/three-dimensional';
import BackToTop from '../../../src/web/components/button/back-to-top';
import ListOfCompounds, {
type Compounds,
} from '../../../src/web/components/compounds';
Expand Down Expand Up @@ -919,7 +918,6 @@ const Element = (props: GetStaticPropsType) => {

return (
<Box display="flex" justifyContent="center" alignItems="center" pb={8}>
<BackToTop />
<Seo
url={sectionValid ? url : `${url}/${section}`}
title={Optional.some(element.name_en)}
Expand Down
2 changes: 0 additions & 2 deletions apps/web/src/web/components/pages/index/common.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import data from '../../../generated/data';
import Seo from '../../../components/seo';
import { DemoTile, EmptyTile, Tile } from '../../../components/table/element';
import SearchBar from '../../../components/common/input';
import BackToTop from '../../../components/button/back-to-top';
import useSearchQuery from '../../../hooks/search';
import useBreakpoint from '../../../hooks/break-point';

Expand Down Expand Up @@ -395,7 +394,6 @@ const Index = (props: ClassificationProps & DeviceType) => {
const search = useSearch();
return (
<Box display="flex" justifyContent="center" alignItems="center" pb={8}>
<BackToTop />
<Seo
url={
props.classification
Expand Down
Loading