Skip to content

Commit

Permalink
causing pages to start from the beginning when rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
daviteixeira-btm committed Sep 4, 2023
1 parent f5debb8 commit b5ea480
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/pages/Blog/pages/Blog.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useEffect } from "react";

import { Flex, Text, Container, Heading, SimpleGrid } from "@chakra-ui/react";

import DesktopMenuBlog from "../components/DesktopMenuBlog";
Expand Down Expand Up @@ -47,6 +49,11 @@ const myBlogCards = [
]

const Blog = () => {

useEffect(() => {
window.scrollTo(0, 0);
}, []);

return (
<Container fontFamily="Arial, Helvetica, sans-serif" maxW="full" padding="0">

Expand Down
7 changes: 7 additions & 0 deletions src/pages/Blog/pages/PageExample.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import { useEffect } from "react";

import { Heading, Text, Flex, Image } from "@chakra-ui/react";

import ReadingBody from "../components/ReadingBody";

import DesktopMenuBlog from "../components/DesktopMenuBlog";

const PageExample = () => {

useEffect(() => {
window.scrollTo(0, 0);
}, []);

return (
<>
<Flex
Expand Down

1 comment on commit b5ea480

@vercel
Copy link

@vercel vercel bot commented on b5ea480 Sep 4, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.