Skip to content

Commit

Permalink
app: Fix server rendering difference for urlbanner
Browse files Browse the repository at this point in the history
  • Loading branch information
biwano committed Nov 17, 2023
1 parent 9e276d9 commit dd8f135
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/components/views/Home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ export const Home: FC = () => {
const localeFromURL = useLocaleFromParams();

const { pathname } = useLocation();
const [showCheckURLBanner, setShowCheckURLBanner] = useState(
!skipCheckURLBanner()
);
const [showCheckURLBanner, setShowCheckURLBanner] = useState(false);

const { locale } = useSelector(selectAppState);

Expand All @@ -66,6 +64,10 @@ export const Home: FC = () => {
}
}, [localeFromURL]);

useEffect(() => {
setShowCheckURLBanner(!skipCheckURLBanner());
}, []);

useEffect(() => {
if (pathname === "/") {
window.location.replace(`/#/stake${window.location.search}`);
Expand Down

0 comments on commit dd8f135

Please sign in to comment.