mirror of
https://github.com/dsoaress/link-free.git
synced 2026-08-18 07:26:03 +01:00
refactor: with styled-components
This commit is contained in:
12
src/utils/destroyCookies.ts
Normal file
12
src/utils/destroyCookies.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { GetServerSidePropsContext } from 'next'
|
||||
import { destroyCookie } from 'nookies'
|
||||
|
||||
export function destroyCookies(ctx: GetServerSidePropsContext | undefined = undefined) {
|
||||
destroyCookie(ctx, 'accessToken', {
|
||||
path: '/'
|
||||
})
|
||||
|
||||
destroyCookie(ctx, 'refreshToken', {
|
||||
path: '/'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user