Skip to content

Commit

Permalink
Fix: WaterPerCoffee & pwabuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
cuconveniencestore authored and hookor committed Jun 5, 2024
1 parent 74d38e9 commit 78dd8b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions public/pwabuilder-sw.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const STATIC_CACHE_NAME = 'ddocker-static-v9';
const STATIC_CACHE_NAME = 'ddocker-static-v1';
const DYNAMIC_CACHE_NAME = 'ddocker-dynamic-v1';

const ASSETS = [
Expand Down Expand Up @@ -180,6 +180,5 @@ const handleError = error => {

self.addEventListener('fetch', event => {
if (event.request.headers.get('Accept') === 'text/event-stream') return;
if (event.request.url.includes('SignIn')) return;
event.respondWith(cacheOrFetch(event.request).catch(handleError));
});
7 changes: 4 additions & 3 deletions src/components/home/WaterPerCoffee.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const { anonymous, signedIn } = TODAY_CAFFEINE_INFO_TEXTS;
const WaterPerCoffee = () => {
const user = useRecoilValue(userInfoState);
const { coffeeInfo: todayCoffeeData } = useGetTodayCoffeeData();

const navigateToStart = useNavigateTo('/start/1');
const navigateToRegister = useNavigateTo('/post/register');
return (
<Container
className={cx(
Expand All @@ -47,7 +48,7 @@ const WaterPerCoffee = () => {
text={anonymous.card}
actionText={BUTTON_TEXTS.signIn1}
btn={true}
fn={useNavigateTo('/start/1')}
fn={navigateToStart}
/>
</Suspense>
</div>
Expand All @@ -58,7 +59,7 @@ const WaterPerCoffee = () => {
<Suspense>
<Button
text={signedIn.btn}
onClick={useNavigateTo('/post/register')}
onClick={navigateToRegister}
className={RegistCoffeeBtn}
/>
</Suspense>
Expand Down

0 comments on commit 78dd8b1

Please sign in to comment.