Upgrade deps
This commit is contained in:
parent
422c446039
commit
de5106e9e8
17 changed files with 3154 additions and 406 deletions
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { FC, useEffect } from "react";
|
||||
import { FC, useEffect, PropsWithChildren } from "react";
|
||||
import { CircularProgress, Typography, Grid } from "@mui/material";
|
||||
import { signIn, signOut, getSession } from "next-auth/react";
|
||||
import { useLogin, useTranslate } from "react-admin";
|
||||
|
|
@ -19,7 +19,7 @@ export const authProvider = {
|
|||
checkError(e: any) {
|
||||
if (e.graphQLErrors && e.graphQLErrors.length > 0) {
|
||||
const permDenied = e.graphQLErrors.some((e: any) =>
|
||||
e.message.match(/.*permission denied.*/)
|
||||
e.message.match(/.*permission denied.*/),
|
||||
);
|
||||
if (permDenied)
|
||||
// eslint-disable-next-line prefer-promise-reject-errors
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// @ts-nocheck
|
||||
|
||||
"use client";
|
||||
|
||||
import { FC, useEffect, useState } from "react";
|
||||
|
|
@ -22,7 +24,7 @@ import { AdminLogin, authProvider } from "./AdminLogin";
|
|||
|
||||
const i18nProvider = polyglotI18nProvider(
|
||||
(_locale: any) => englishMessages,
|
||||
"en"
|
||||
"en",
|
||||
);
|
||||
|
||||
const MetamigoAdmin: FC = () => {
|
||||
|
|
@ -46,6 +48,7 @@ const MetamigoAdmin: FC = () => {
|
|||
dataProvider={dataProvider}
|
||||
layout={Layout}
|
||||
i18nProvider={i18nProvider}
|
||||
// @ts-ignore
|
||||
loginPage={AdminLogin}
|
||||
// @ts-ignore
|
||||
authProvider={authProvider}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export const Layout = (props: LayoutProps) => (
|
|||
<RaLayout
|
||||
{...props}
|
||||
appBar={AppBar}
|
||||
menu={Menu}
|
||||
menu={Menu as any}
|
||||
sidebar={CustomSidebar}
|
||||
// @ts-ignore
|
||||
theme={theme}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
import { useSession } from "next-auth/react";
|
||||
import { validateE164Number } from "../../../_lib/phone-numbers";
|
||||
|
||||
const SignalBotCreate:FC<CreateProps> = (props) => {
|
||||
const SignalBotCreate: FC<CreateProps> = (props) => {
|
||||
const { data: session } = useSession();
|
||||
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import { FC } from "react";
|
||||
import {
|
||||
List,
|
||||
Datagrid,
|
||||
|
|
@ -10,7 +11,7 @@ import {
|
|||
BooleanField,
|
||||
} from "react-admin";
|
||||
|
||||
const UserList = () => (
|
||||
const UserList: FC = () => (
|
||||
<List exporter={false}>
|
||||
<Datagrid rowClick="edit">
|
||||
<EmailField source="email" />
|
||||
|
|
|
|||
|
|
@ -1,11 +1,18 @@
|
|||
"use client";
|
||||
|
||||
// import dynamic from "next/dynamic";
|
||||
import { SimpleForm, Create, TextInput, required } from "react-admin";
|
||||
import { FC } from "react";
|
||||
import {
|
||||
SimpleForm,
|
||||
Create,
|
||||
TextInput,
|
||||
required,
|
||||
CreateProps,
|
||||
} from "react-admin";
|
||||
import { useSession } from "next-auth/react";
|
||||
import { validateE164Number } from "../../../_lib/phone-numbers";
|
||||
|
||||
const WhatsappBotCreate = (props: any) => {
|
||||
const WhatsappBotCreate: FC<CreateProps> = (props) => {
|
||||
// const MuiPhoneNumber = dynamic(() => import("material-ui-phone-number"), {
|
||||
// ssr: false,
|
||||
// });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue