generated from muhtadeetaron/nextjs-template
fix(ui): minor ui tweak in pretest screen
This commit is contained in:
@ -81,7 +81,7 @@ function PretestPageContent() {
|
||||
return (
|
||||
<BackgroundWrapper>
|
||||
<div className="min-h-screen">
|
||||
<div className="mx-10 mt-10">
|
||||
<div className="mx-10 pt-10">
|
||||
<button
|
||||
onClick={() => router.push("/categories/subjects")}
|
||||
className="mb-4"
|
||||
|
||||
@ -7,13 +7,13 @@ const setCookie = (name: string, value: string | null, days: number = 7) => {
|
||||
if (typeof document === "undefined") return;
|
||||
|
||||
if (value === null) {
|
||||
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Strict; Secure`;
|
||||
document.cookie = `${name}=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; SameSite=Lax;`; //SameSite=Strict; Secure in production
|
||||
} else {
|
||||
const expires = new Date();
|
||||
expires.setTime(expires.getTime() + days * 24 * 60 * 60 * 1000);
|
||||
document.cookie = `${name}=${encodeURIComponent(
|
||||
value
|
||||
)}; expires=${expires.toUTCString()}; path=/; SameSite=Strict; Secure`;
|
||||
)}; expires=${expires.toUTCString()}; path=/; SameSite=Lax;`; //SameSite=Strict; Secure in production
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user