mirror of
https://github.com/BrenBroZAYT/gameyfin.git
synced 2026-06-16 00:30:02 +00:00
Add Sonner component
This commit is contained in:
@@ -8,6 +8,7 @@ import {Card} from "@nextui-org/react";
|
||||
import {SetupEndpoint} from "Frontend/generated/endpoints";
|
||||
import {ThemeSelector} from "Frontend/components/theming/ThemeSelector";
|
||||
import {useNavigate} from "react-router-dom";
|
||||
import {toast} from "sonner";
|
||||
|
||||
function WelcomeStep() {
|
||||
return (
|
||||
@@ -99,6 +100,7 @@ function SetupView() {
|
||||
password: values.password,
|
||||
email: values.email
|
||||
});
|
||||
toast("Setup finished", {description: "Have fun with Gameyfin!"});
|
||||
navigate('/login');
|
||||
} catch (e) {
|
||||
alert("An error occurred while completing the setup. Please try again.")
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
import {Link} from "react-router-dom";
|
||||
import {Button} from "@nextui-org/react";
|
||||
import {toast} from "sonner";
|
||||
|
||||
export default function TestView() {
|
||||
return (
|
||||
<div className="flex grow justify-center">
|
||||
<Link to="/setup">Setup</Link>
|
||||
<div className="flex grow justify-center mt-12">
|
||||
<div className="flex flex-col items-center gap-6">
|
||||
<Link to="/setup">Setup</Link>
|
||||
<Button onPress={
|
||||
() => toast("Setup finished", {
|
||||
description: "Have fun with Gameyfin!",
|
||||
action: {
|
||||
label: "OK",
|
||||
onClick: () => console.log("Ok"),
|
||||
}
|
||||
})}>Toast</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user