Skip to content

Commit

Permalink
fix mui
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-torabiv committed Nov 28, 2024
1 parent 02a3997 commit 35914c7
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 124 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { TreeItem, TreeView } from '@mui/lab';
import { FormControlLabel } from '@mui/material';
import { SimpleTreeView, TreeItem } from '@mui/x-tree-view';
import { MdChevronRight, MdExpandMore } from 'react-icons/md';
import { TbRefresh } from 'react-icons/tb';

Expand Down Expand Up @@ -142,14 +142,16 @@ function TcHivemindDiscordAnswering({
<Loading />
</div>
) : (
<TreeView
defaultCollapseIcon={<MdExpandMore />}
defaultExpandIcon={<MdChevronRight />}
<SimpleTreeView
slots={{
collapseIcon: MdExpandMore,
expandIcon: MdChevronRight,
}}
>
{discordPlatformChannels.map((channel, index) => (
<TreeItem
key={index}
nodeId={channel.channelId}
itemId={channel.channelId}
label={
<div className='flex items-center justify-between'>
<TcText
Expand Down Expand Up @@ -184,7 +186,7 @@ function TcHivemindDiscordAnswering({
{channel.subChannels.map((subChannel, index) => (
<TreeItem
key={index}
nodeId={subChannel.channelId}
itemId={subChannel.channelId}
label={
<div className='flex items-center justify-between'>
<TcText text={subChannel.name} variant='subtitle1' />
Expand Down Expand Up @@ -215,7 +217,7 @@ function TcHivemindDiscordAnswering({
))}
</TreeItem>
))}
</TreeView>
</SimpleTreeView>
)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { TreeItem, TreeView } from '@mui/lab';
import { FormControlLabel } from '@mui/material';
import { SimpleTreeView, TreeItem } from '@mui/x-tree-view';
import moment from 'moment';
import { MdCalendarMonth, MdExpandMore } from 'react-icons/md';
import { MdChevronRight } from 'react-icons/md';
Expand Down Expand Up @@ -203,14 +203,16 @@ function TcHivemindDiscordLearnings({
<Loading />
</div>
) : (
<TreeView
defaultCollapseIcon={<MdExpandMore />}
defaultExpandIcon={<MdChevronRight />}
<SimpleTreeView
slots={{
collapseIcon: MdExpandMore,
expandIcon: MdChevronRight,
}}
>
{discordPlatformChannels.map((channel, index) => (
<TreeItem
key={index}
nodeId={channel.channelId}
itemId={channel.channelId}
label={
<div className='flex items-center justify-between'>
<TcText
Expand Down Expand Up @@ -245,7 +247,7 @@ function TcHivemindDiscordLearnings({
{channel.subChannels.map((subChannel, index) => (
<TreeItem
key={index}
nodeId={subChannel.channelId}
itemId={subChannel.channelId}
label={
<div className='flex items-center justify-between'>
<TcText text={subChannel.name} variant='subtitle1' />
Expand Down Expand Up @@ -276,7 +278,7 @@ function TcHivemindDiscordLearnings({
))}
</TreeItem>
))}
</TreeView>
</SimpleTreeView>
)}
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React, { useEffect, useState } from 'react';
import { TreeItem, TreeView } from '@mui/lab';
import {
Alert,
AlertTitle,
CircularProgress,
FormControlLabel,
Typography,
} from '@mui/material';
import { SimpleTreeView, TreeItem } from '@mui/x-tree-view';
import moment from 'moment';
import { useRouter } from 'next/router';
import { AiOutlineClose } from 'react-icons/ai';
Expand All @@ -15,6 +15,7 @@ import { IoClose, IoSettingsSharp } from 'react-icons/io5';
import { MdCalendarMonth, MdExpandMore } from 'react-icons/md';
import { MdChevronRight } from 'react-icons/md';
import { RiTimeLine } from 'react-icons/ri';
import '@mui/lab';

import TcCommunityPlatformIcon from './TcCommunityPlatformIcon';
import TcButton from '../../shared/TcButton';
Expand Down Expand Up @@ -398,13 +399,15 @@ function TcDiscordIntegrationSettingsDialog({
<CircularProgress />
</div>
) : (
<TreeView
defaultCollapseIcon={<MdExpandMore />}
defaultExpandIcon={<MdChevronRight />}
<SimpleTreeView
slots={{
collapseIcon: MdExpandMore,
expandIcon: MdChevronRight,
}}
>
{discordPlatformChannels?.map((channel, index) => (
<TreeItem
nodeId={channel.channelId}
itemId={channel.channelId}
label={
<div className='flex items-center justify-between'>
<TcText
Expand Down Expand Up @@ -442,7 +445,7 @@ function TcDiscordIntegrationSettingsDialog({
>
{channel.subChannels.map((subChannel, index) => (
<TreeItem
nodeId={subChannel.channelId}
itemId={subChannel.channelId}
label={
<div className='flex items-center justify-between'>
<TcText
Expand Down Expand Up @@ -476,7 +479,7 @@ function TcDiscordIntegrationSettingsDialog({
))}
</TreeItem>
))}
</TreeView>
</SimpleTreeView>
)}
</div>
</>
Expand Down Expand Up @@ -528,7 +531,7 @@ function TcDiscordIntegrationSettingsDialog({
variant='h6'
/>
</div>
<div className='flex flex-col justify-between space-y-4 pb-8 md:flex-row md:space-y-0 md:space-x-5 md:py-12'>
<div className='flex flex-col justify-between space-y-4 pb-8 md:flex-row md:space-x-5 md:space-y-0 md:py-12'>
<div className='space-y-4 rounded-md px-4 py-6 shadow-xl'>
<TcText
text='Disconnect and delete data'
Expand Down
Loading

0 comments on commit 35914c7

Please sign in to comment.