Skip to content

Commit

Permalink
linter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alvinsj committed Jun 9, 2024
1 parent 9d69fd5 commit c96770d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ export const saveCookie = (name: string, value: string, mins: number = 60) => {

const date = new Date()
date.setTime(date.getTime() + mins * 60 * 1000)
document.cookie = `${name}=${value};Expires=${date.toUTCString()};\ path=/; Secure; SameSite=Strict`
document.cookie =
`${name}=${value};Expires=${date.toUTCString()}; \
path=/; Secure; SameSite=Strict`
}

export const getCookie = (name: string) => {
Expand Down
2 changes: 2 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ function App() {
}

return () => clearAllCookies()
// on mount only
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])

return (
Expand Down
1 change: 0 additions & 1 deletion src/utils/auth.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
deleteStateCookie,
getStateCookie,
createStateCookie
} from "@/utils/stateCookie"
Expand Down

0 comments on commit c96770d

Please sign in to comment.