Commit 4c279658 by Arjun Jhukal

cleard the catch clear status

parent aeeea9c5
...@@ -43,7 +43,7 @@ export default function PaymentSetup() { ...@@ -43,7 +43,7 @@ export default function PaymentSetup() {
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Error Updating Paymnet Setting", message: e?.data?.message || "Error Updating Paymnet Setting",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
......
...@@ -59,7 +59,7 @@ export default function NotificationPage({ ...@@ -59,7 +59,7 @@ export default function NotificationPage({
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Unable to read notification", message: e?.data?.message || "Unable to read notification",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
...@@ -73,7 +73,7 @@ export default function NotificationPage({ ...@@ -73,7 +73,7 @@ export default function NotificationPage({
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Unable to read notification", message: e?.data?.message || "Unable to read notification",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
......
...@@ -44,7 +44,7 @@ export default function UpdatePassword() { ...@@ -44,7 +44,7 @@ export default function UpdatePassword() {
dispatch( dispatch(
showToast({ showToast({
variant: ToastVariant.ERROR, variant: ToastVariant.ERROR,
message: e.message || "Something went wrong" message: e?.data?.message || "Something went wrong"
}) })
) )
} }
......
...@@ -149,7 +149,7 @@ export default function AddGameForm({ id }: AddGameFormProps) { ...@@ -149,7 +149,7 @@ export default function AddGameForm({ id }: AddGameFormProps) {
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message, message: e?.data?.message,
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
......
...@@ -83,7 +83,7 @@ export default function AddPageForm({ id }: { id?: string }) { ...@@ -83,7 +83,7 @@ export default function AddPageForm({ id }: { id?: string }) {
console.error("Error submitting form:", e); console.error("Error submitting form:", e);
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Something went wrong", message: e?.data?.message || "Something went wrong",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
); );
...@@ -103,7 +103,7 @@ export default function AddPageForm({ id }: { id?: string }) { ...@@ -103,7 +103,7 @@ export default function AddPageForm({ id }: { id?: string }) {
console.error("Error submitting form:", e); console.error("Error submitting form:", e);
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Something went wrong", message: e?.data?.message || "Something went wrong",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
); );
......
...@@ -291,9 +291,9 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel } ...@@ -291,9 +291,9 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel }
<div className="input__field"> <div className="input__field">
<PasswordField <PasswordField
required={id ? false : true} required={id ? false : true}
name="password" name="password"
label="Password*" label="Password"
placeholder="Enter password" placeholder="Enter password"
value={formik.values.password} value={formik.values.password}
onChange={formik.handleChange} onChange={formik.handleChange}
...@@ -305,9 +305,8 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel } ...@@ -305,9 +305,8 @@ export default function AddPlayerForm({ formik, id, data, loading, buttonLabel }
<div className="input__field"> <div className="input__field">
<PasswordField <PasswordField
required={id ? false : true} required={id ? false : true}
name="password_confirmation" name="password_confirmation"
label="Confirm Password*" label="Confirm Password"
placeholder="Confirm password" placeholder="Confirm password"
value={formik.values.password_confirmation} value={formik.values.password_confirmation}
onChange={formik.handleChange} onChange={formik.handleChange}
......
...@@ -244,7 +244,7 @@ export default function PlayerListing() { ...@@ -244,7 +244,7 @@ export default function PlayerListing() {
dispatch( dispatch(
showToast({ showToast({
variant: ToastVariant.ERROR, variant: ToastVariant.ERROR,
message: e.message || "Unable to download CSV.", message: e?.data?.message || "Unable to download CSV.",
}) })
); );
} }
......
...@@ -89,7 +89,7 @@ export default function BannerSlider() { ...@@ -89,7 +89,7 @@ export default function BannerSlider() {
} catch (e: any) { } catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Something went wrong", message: e?.data?.message || "Something went wrong",
variant: ToastVariant.ERROR, variant: ToastVariant.ERROR,
}) })
); );
......
...@@ -98,7 +98,7 @@ export default function SiteSetting() { ...@@ -98,7 +98,7 @@ export default function SiteSetting() {
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Something Went Wrong", message: e?.data?.message || "Something Went Wrong",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
......
...@@ -182,7 +182,7 @@ export default function TransactionTable({ user_id, game_id, search, setSearch } ...@@ -182,7 +182,7 @@ export default function TransactionTable({ user_id, game_id, search, setSearch }
dispatch( dispatch(
showToast({ showToast({
variant: ToastVariant.ERROR, variant: ToastVariant.ERROR,
message: e.message || "Unable to download CSV.", message: e?.data?.message || "Unable to download CSV.",
}) })
); );
} }
......
...@@ -35,7 +35,7 @@ export default function EditUserWallet() { ...@@ -35,7 +35,7 @@ export default function EditUserWallet() {
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Unable to connect wallet. Try Again Later", message: e?.data?.message || "Unable to connect wallet. Try Again Later",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
......
...@@ -34,7 +34,7 @@ export default function ConnectWalletForm() { ...@@ -34,7 +34,7 @@ export default function ConnectWalletForm() {
catch (e: any) { catch (e: any) {
dispatch( dispatch(
showToast({ showToast({
message: e.message || "Unable to connect wallet. Try Again Later", message: e?.data?.message || "Unable to connect wallet. Try Again Later",
variant: ToastVariant.ERROR variant: ToastVariant.ERROR
}) })
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment