humblFINANCE / humblFINANCE-frontend

the official codebase for the humblFINANCE web app
https://humbl-finance-frontend.vercel.app
Other
0 stars 0 forks source link

[FEAT]: add loading spinner to logout button #16

Open jjfantini opened 2 months ago

jjfantini commented 2 months ago

Main Goal

Right now, when you logoout, when you click the button it closes the modal and then you wait on the homepage for a second while supabsae logs you out. I would like this a loading spinner to show as the server makes its request to logout, and then redirect to the landing-page after complete, so the user doesnt see the modal close and go back to the dashboard.

Add this spinner instead of static "Loading..."

jjfantini commented 3 weeks ago
import React from "react";
import {Button} from "@nextui-org/react";

export default function App() {
  return (
    <Button color="primary" isLoading>
      Loading
    </Button>
  );
}

tUsing this logic for NextUI Button, will automatically show a spinner