From 361b52717e371356e1b957078c3b662abd4c8cfb Mon Sep 17 00:00:00 2001 From: Yurii Kuvshynov Date: Tue, 25 Oct 2022 04:35:07 +0200 Subject: [PATCH] fix: github pages path --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index e2eee4a..3b0e5e3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -35,7 +35,7 @@ function saveHistory({query, page, gifs}: HistoryState){ const params = new URLSearchParams(); if (query !== '') params.append('query', query); if (page !== 1) params.append('page', page.toString()); - window.history.pushState({query, page, gifs} as HistoryState, '', "/#" + params.toString()); + window.history.pushState({query, page, gifs} as HistoryState, '', window.location.pathname + "#" + params.toString()); }