hermes-web/app/(protected)/settings/emotes/page.tsx

28 lines
683 B
TypeScript
Raw Permalink Normal View History

"use client";
import axios from "axios";
import * as React from 'react';
import { useEffect, useState } from "react";
import { useSession } from "next-auth/react";
const RedemptionsPage = () => {
const { data: session, status } = useSession();
const [previousUsername, setPreviousUsername] = useState<string | null>()
useEffect(() => {
if (status !== "authenticated" || previousUsername == session.user?.name) {
return
}
setPreviousUsername(session.user?.name)
axios.get("/api/settings/redemptions/actions")
}, [session])
return (
<div>
</div>
);
}
export default RedemptionsPage;