update token refresh function
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import { useTranslations } from 'next-intl';
|
import { useTranslations } from 'next-intl';
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import PageTitle from '@/app/ui/page-title';
|
import PageTitle from '@/app/ui/page-title';
|
||||||
|
import ReferralStats from '@/app/ui/referral-page/referral-stats';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
const t = useTranslations('Global');
|
const t = useTranslations('Global');
|
||||||
@@ -9,6 +10,7 @@ export default function Page() {
|
|||||||
<Suspense fallback={<>...</>}>
|
<Suspense fallback={<>...</>}>
|
||||||
<PageTitle title="refferal-program">
|
<PageTitle title="refferal-program">
|
||||||
</PageTitle>
|
</PageTitle>
|
||||||
|
<ReferralStats />
|
||||||
<div>
|
<div>
|
||||||
refferals
|
refferals
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ export async function tokenLifeExtension() {
|
|||||||
const parsed = await response.json();
|
const parsed = await response.json();
|
||||||
console.log('tokenLifeExtension');
|
console.log('tokenLifeExtension');
|
||||||
console.log(parsed.message_code);
|
console.log(parsed.message_code);
|
||||||
updateSession();
|
await updateSession();
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await deleteSession();
|
await deleteSession();
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import 'server-only'
|
'use server';
|
||||||
|
|
||||||
|
/* import 'server-only'; */
|
||||||
import { cookies } from 'next/headers'
|
import { cookies } from 'next/headers'
|
||||||
import { SignJWT, jwtVerify } from 'jose'
|
import { SignJWT, jwtVerify } from 'jose'
|
||||||
/* import { SessionPayload } from '@/app/lib/definitions' */
|
|
||||||
|
|
||||||
/* const secretKey = process.env.SESSION_SECRET */
|
/* const secretKey = process.env.SESSION_SECRET */
|
||||||
const secretKey = 'AAA+sq1yKte/gMgUUu/B/OyXqr45/LMYplPVOlWc+uo='
|
const secretKey = 'AAA+sq1yKte/gMgUUu/B/OyXqr45/LMYplPVOlWc+uo='
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
export default function ReferralStats() {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
test
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user