🚚 Change setCookies to setCookie

This commit is contained in:
ajnart
2022-07-22 16:20:47 +02:00
parent 7b719c2273
commit 4628d1d1d7
5 changed files with 10 additions and 10 deletions

View File

@@ -1,4 +1,4 @@
import { getCookie, setCookies } from 'cookies-next';
import { getCookie, setCookie } from 'cookies-next';
import { GetServerSidePropsContext } from 'next';
import { useEffect } from 'react';
import AppShelf from '../components/AppShelf/AppShelf';
@@ -16,7 +16,7 @@ export async function getServerSideProps({
}: GetServerSidePropsContext): Promise<{ props: { config: Config } }> {
let cookie = getCookie('config-name', { req, res });
if (!cookie) {
setCookies('config-name', 'default', {
setCookie('config-name', 'default', {
req,
res,
maxAge: 60 * 60 * 24 * 30,