feat(page): partner

main
shengbin.ma 2 weeks ago
parent 9cda035fa5
commit 67b9dc16d8

@ -0,0 +1,25 @@
/**
*
*/
'use client';
import { useEffect } from 'react';
async function fetchSourece(source: string) {
if (!source) return;
const res = await fetch(`${process.env.NEXT_PUBLIC_HOST}/comment/visit/count/o2o?source=${source}`);
return res.json();
}
export default function Invite() {
useEffect(() => {
const searchParams = new URLSearchParams(window.location.search);
fetchSourece((searchParams as any)?.get('source'))
.then(() => {})
.finally(() => {
window.location.replace('/');
});
}, []);
return <main></main>;
}
Loading…
Cancel
Save