From 8cb283c22f183d8ae54c35feea7e2991edd30945 Mon Sep 17 00:00:00 2001 From: zuies Date: Tue, 20 Feb 2024 10:26:35 +0300 Subject: [PATCH] update prettier config --- .eslintrc.js | 21 +-- .eslintrc.json | 8 +- .prettierrc | 10 +- jest.config.js | 4 +- jest.setup.js | 2 +- next.config.js | 10 +- package-lock.json | 95 +++++++++++-- package.json | 7 +- postcss.config.js | 2 +- .../announcements/TcAnnouncementsAlert.tsx | 8 +- .../announcements/TcAnnouncementsTable.tsx | 86 ++++++------ .../TcConfirmSchaduledAnnouncementsDialog.tsx | 60 ++++----- src/components/announcements/TcTimeZone.tsx | 24 ++-- .../announcements/create/TcIconContainer.tsx | 2 +- .../TcPrivateMessageContainer.tsx | 54 ++++---- .../TcPrivateMessagePreviewDialog.tsx | 56 ++++---- .../TcRolesAutoComplete.tsx | 6 +- .../TcUsersAutoComplete.tsx | 20 +-- .../TcPublicMessageContainer.tsx | 54 ++++---- .../TcPublicMessagePreviewDialog.spec.tsx | 2 +- .../TcPublicMessagePreviewDialog.tsx | 40 +++--- .../TcDateTimePopover.tsx | 20 +-- .../TcScheduleAnnouncement.tsx | 18 +-- .../selectPlatform/TcSelectPlatform.tsx | 26 ++-- .../selectCommunity/TcCommunityListItems.tsx | 18 +-- .../selectCommunity/TcSelectCommunity.tsx | 32 ++--- .../communitySettings/TcIntegrationCard.tsx | 4 +- .../TcAvailableIntegrations.tsx | 2 +- .../TcAvailableIntegrationsItem.tsx | 22 +-- .../TcCommunityIntegrations.tsx | 18 +-- .../TcCommunityIntegrationsConfirmDialog.tsx | 20 +-- .../TcCommunityIntegrationsDialog.tsx | 24 ++-- .../TcConnectedPlatforms.spec.tsx | 2 +- .../TcConnectedPlatforms.tsx | 2 +- .../TcConnectedPlatformsItem.tsx | 24 ++-- .../platform/TcCommunityName.tsx | 20 +-- .../platform/TcDisconnectPlatform.tsx | 42 +++--- .../communitySettings/platform/TcPlatform.tsx | 14 +- .../platform/TcPlatformChannelDialog.tsx | 22 +-- .../platform/TcPlatformChannelDialogBody.tsx | 2 +- .../TcPlatformChannelDialogFooter.tsx | 16 +-- .../TcPlatformChannelDialogHeader.tsx | 4 +- .../platform/TcPlatformChannelList.tsx | 32 ++--- .../platform/TcPlatformChannels.tsx | 8 +- .../platform/TcPlatformPeriod.tsx | 20 +-- .../switchCommunity/TcActiveCommunity.tsx | 33 +++-- .../TcConfirmDeleteCommunity.tsx | 60 ++++----- .../switchCommunity/TcSwitchCommunity.tsx | 8 +- src/components/global/CustomTab.tsx | 2 +- src/components/global/EmptyState.tsx | 12 +- src/components/global/FilterByChannels.tsx | 24 ++-- .../FilterPopover/FilterRolesPopover.tsx | 50 +++---- src/components/global/Link.tsx | 2 +- src/components/global/Loading.tsx | 2 +- src/components/global/LoadingBackdrop.tsx | 2 +- src/components/global/RangeSelect.tsx | 10 +- src/components/global/SEO.tsx | 4 +- .../TcPermissionHints/TcPermissionHints.tsx | 126 +++++++++--------- src/components/global/ZonePicker.tsx | 30 ++--- src/components/layouts/Sidebar.tsx | 32 ++--- src/components/layouts/shared/TcPrompt.tsx | 8 +- src/components/layouts/xs/SidebarXs.tsx | 36 ++--- .../communityHealth/CommunityStatusShower.tsx | 24 ++-- .../communityHealth/Decentralization.tsx | 60 ++++----- .../pages/communityHealth/Fragmentation.tsx | 60 ++++----- .../pages/communityHealth/HeaderSection.tsx | 20 +-- .../pages/communityHealth/TipsDialog.spec.tsx | 8 +- .../pages/communityHealth/TipsDialog.tsx | 14 +- .../TcIntegrationDialog.spec.tsx | 4 +- .../communitySettings/TcIntegrationDialog.tsx | 16 +-- .../memberInteraction/ForceGraphComponent.tsx | 74 +++++----- .../pages/memberInteraction/HintBox.tsx | 40 +++--- .../pageIndex/ActiveMemberComposition.tsx | 18 +-- .../pages/pageIndex/HeatmapChart.tsx | 30 ++--- .../pageIndex/MemberInteractionGraph.tsx | 20 +-- .../pages/pageIndex/NumberOfMessages.tsx | 8 +- .../statistics/ActiveMembersComposition.tsx | 22 +-- .../DisengagedMembersComposition.tsx | 22 +-- .../pages/statistics/InactiveMembers.tsx | 14 +- .../pages/statistics/InteractionsSection.tsx | 16 +-- .../pages/statistics/Onboarding.tsx | 20 +-- .../pages/statistics/StatisticalData.tsx | 36 ++--- .../memberBreakdowns/CustomDialogDetail.tsx | 44 +++--- .../memberBreakdowns/CustomPagination.tsx | 4 +- .../memberBreakdowns/CustomTable.tsx | 96 ++++++------- .../activeMembers/ActiveMemberBreakdown.tsx | 24 ++-- .../DisengagedMembersCompositionBreakdown.tsx | 24 ++-- .../OnboardingMembersBreakdown.tsx | 24 ++-- src/components/shared/TcAlert.spec.tsx | 2 +- .../shared/TcBox/TcBoxContainer.spec.tsx | 4 +- .../shared/TcBox/TcBoxContainer.tsx | 2 +- .../shared/TcBox/TcBoxTitleContainer.spec.tsx | 2 +- src/components/shared/TcBreadcrumbs.tsx | 6 +- src/components/shared/TcButton.spec.tsx | 6 +- src/components/shared/TcButton.tsx | 4 +- src/components/shared/TcDatePickerPopover.tsx | 12 +- .../shared/TcIconWithTooltip.spec.tsx | 8 +- src/components/shared/TcIconWithTooltip.tsx | 4 +- src/components/shared/TcLink.tsx | 2 +- .../shared/TcPagination/TcPagination.tsx | 4 +- src/components/shared/TcSelect/TcSelect.tsx | 2 +- .../shared/TcTableContainer/TcTableBody.tsx | 2 +- .../TcTableContainer/TcTableContainer.tsx | 2 +- .../shared/TcTableContainer/TcTableHead.tsx | 2 +- .../shared/TcTableContainer/TcTableRow.tsx | 2 +- .../TcAccountActivity.spec.tsx | 4 +- .../TcAccountActivityContent.tsx | 14 +- .../TcAccountActivityHeader.tsx | 22 +-- .../audienceResponse/TcAudienceResponse.tsx | 2 +- .../TcAudienceResponseContent.tsx | 18 +-- .../TcAudienceResponseHeader.tsx | 10 +- .../TcEngagementAccountContentItems.tsx | 16 +-- .../TcEngagementAccounts.tsx | 2 +- .../TcEngagementAccountsContent.tsx | 22 +-- .../TcEngagementAccountsHeader.tsx | 2 +- .../growth/voteFeature/TcvoteFeature.tsx | 10 +- .../voteFeature/TcvoteFeatureHeader.tsx | 8 +- .../TcvoteFeatureVotes/TcvoteFeatureVotes.tsx | 4 +- .../TcvoteFeatureVotesItems.spec.tsx | 16 +-- .../TcvoteFeatureVotesItems.tsx | 4 +- .../TcYourAccountActivity.tsx | 2 +- .../TcYourAccountActivityContent.tsx | 18 +-- .../TcYourAccountActivityHeader.tsx | 12 +- src/context/ChannelContext.tsx | 19 +-- src/layouts/centricLayout.tsx | 6 +- src/layouts/defaultLayout.tsx | 4 +- src/layouts/emptyLayout.tsx | 4 +- src/lib/attributes/Menu.ts | 14 +- src/pages/_app.tsx | 2 +- src/pages/_error.tsx | 46 +++---- .../create-new-announcements.tsx | 30 ++--- .../edit-announcements/index.tsx | 20 +-- src/pages/announcements/index.tsx | 40 +++--- src/pages/callback.tsx | 2 +- src/pages/centric/create-new-community.tsx | 40 +++--- src/pages/centric/index.tsx | 22 +-- src/pages/centric/select-community.tsx | 6 +- src/pages/centric/tac.tsx | 28 ++-- src/pages/community-health.tsx | 6 +- src/pages/community-settings/index.tsx | 10 +- .../community-settings/platform/index.tsx | 4 +- src/pages/growth.tsx | 10 +- src/pages/index.tsx | 10 +- src/pages/membersInteraction.tsx | 32 ++--- src/pages/statistics.tsx | 24 ++-- svg.d.ts | 6 +- tailwind.config.js | 14 +- 147 files changed, 1444 insertions(+), 1373 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 23bdbc22..9aa2521f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,21 +1,14 @@ module.exports = { env: { browser: true, - es2021: true + es2021: true, }, - extends: [ - 'plugin:react/recommended', - 'standard-with-typescript' - ], - overrides: [ - ], + extends: ['plugin:react/recommended', 'standard-with-typescript'], + overrides: [], parserOptions: { ecmaVersion: 'latest', - sourceType: 'module' + sourceType: 'module', }, - plugins: [ - 'react' - ], - rules: { - } -} + plugins: ['react'], + rules: {}, +}; diff --git a/.eslintrc.json b/.eslintrc.json index ddb2c248..a83dd976 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -7,15 +7,11 @@ "plugin:prettier/react", "plugin:prettier/@typescript-eslint" ], - "plugins": [ - "@typescript-eslint", - "react", - "prettier" - ], + "plugins": ["@typescript-eslint", "react", "prettier"], "rules": { "react/react-in-jsx-scope": "off" }, "globals": { "React": "writable" } -} \ No newline at end of file +} diff --git a/.prettierrc b/.prettierrc index 1196752f..f5a575dc 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,8 @@ { - "semi": true, - "singleQuote": true -} \ No newline at end of file + "trailingComma": "es5", + "semi": true, + "tabWidth": 2, + "singleQuote": true, + "jsxSingleQuote": true, + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/jest.config.js b/jest.config.js index d4baced8..fecfc3b2 100644 --- a/jest.config.js +++ b/jest.config.js @@ -32,5 +32,5 @@ module.exports = { '/node_modules/', '^.+\\.module\\.(css|sass|scss)$', ], - setupFilesAfterEnv: ['/jest.setup.js'] -} + setupFilesAfterEnv: ['/jest.setup.js'], +}; diff --git a/jest.setup.js b/jest.setup.js index a5dd1979..32fa2e5f 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -1,3 +1,3 @@ // jest.setup.js -import '@testing-library/jest-dom/extend-expect' +import '@testing-library/jest-dom/extend-expect'; diff --git a/next.config.js b/next.config.js index 999eb343..d90f7de3 100644 --- a/next.config.js +++ b/next.config.js @@ -1,16 +1,12 @@ /** @type {import('next').NextConfig} */ - const nextConfig = { reactStrictMode: false, swcMinify: true, trailingSlash: true, images: { - unoptimized: true + unoptimized: true, }, -} - -module.exports = nextConfig - - +}; +module.exports = nextConfig; diff --git a/package-lock.json b/package-lock.json index 4c8d3d22..89743a2f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -46,7 +46,6 @@ "next": "13.0.2", "next-router-mock": "^0.9.9", "papaparse": "^5.4.1", - "prettier": "^2.8.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-force-graph": "^1.43.0", @@ -76,6 +75,8 @@ "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", "postcss": "^8.4.18", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.11", "react-test-renderer": "^18.2.0", "tailwindcss": "^3.2.2" } @@ -10047,14 +10048,14 @@ "integrity": "sha512-8HGGcsH0xefDkhtWzXhigzieKtervWPQgyX8RtQD3cKr4wU307j8XANVSaZLxbR0+1EBonCJNOdUrQ7hbk3Kiw==" }, "node_modules/prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==", + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -10071,6 +10072,75 @@ "node": ">=6.0.0" } }, + "node_modules/prettier-plugin-tailwindcss": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz", + "integrity": "sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==", + "dev": true, + "engines": { + "node": ">=14.21.3" + }, + "peerDependencies": { + "@ianvs/prettier-plugin-sort-imports": "*", + "@prettier/plugin-pug": "*", + "@shopify/prettier-plugin-liquid": "*", + "@trivago/prettier-plugin-sort-imports": "*", + "prettier": "^3.0", + "prettier-plugin-astro": "*", + "prettier-plugin-css-order": "*", + "prettier-plugin-import-sort": "*", + "prettier-plugin-jsdoc": "*", + "prettier-plugin-marko": "*", + "prettier-plugin-organize-attributes": "*", + "prettier-plugin-organize-imports": "*", + "prettier-plugin-style-order": "*", + "prettier-plugin-svelte": "*" + }, + "peerDependenciesMeta": { + "@ianvs/prettier-plugin-sort-imports": { + "optional": true + }, + "@prettier/plugin-pug": { + "optional": true + }, + "@shopify/prettier-plugin-liquid": { + "optional": true + }, + "@trivago/prettier-plugin-sort-imports": { + "optional": true + }, + "prettier-plugin-astro": { + "optional": true + }, + "prettier-plugin-css-order": { + "optional": true + }, + "prettier-plugin-import-sort": { + "optional": true + }, + "prettier-plugin-jsdoc": { + "optional": true + }, + "prettier-plugin-marko": { + "optional": true + }, + "prettier-plugin-organize-attributes": { + "optional": true + }, + "prettier-plugin-organize-imports": { + "optional": true + }, + "prettier-plugin-style-order": { + "optional": true + }, + "prettier-plugin-svelte": { + "optional": true + }, + "prettier-plugin-twig-melody": { + "optional": true + } + } + }, "node_modules/pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", @@ -19004,9 +19074,9 @@ "integrity": "sha512-8HGGcsH0xefDkhtWzXhigzieKtervWPQgyX8RtQD3cKr4wU307j8XANVSaZLxbR0+1EBonCJNOdUrQ7hbk3Kiw==" }, "prettier": { - "version": "2.8.4", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.4.tgz", - "integrity": "sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw==" + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==" }, "prettier-linter-helpers": { "version": "1.0.0", @@ -19016,6 +19086,13 @@ "fast-diff": "^1.1.2" } }, + "prettier-plugin-tailwindcss": { + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/prettier-plugin-tailwindcss/-/prettier-plugin-tailwindcss-0.5.11.tgz", + "integrity": "sha512-AvI/DNyMctyyxGOjyePgi/gqj5hJYClZ1avtQvLlqMT3uDZkRbi4HhGUpok3DRzv9z7Lti85Kdj3s3/1CeNI0w==", + "dev": true, + "requires": {} + }, "pretty-format": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.5.1.tgz", diff --git a/package.json b/package.json index 85891dc1..b7361af9 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,9 @@ "lint": "eslint --ext .ts,.tsx", "test": "jest", "coverage": "jest --coverage", - "export": "next export" + "export": "next export", + "format": "prettier --check --ignore-path .gitignore .", + "format:fix": "prettier --write --ignore-path .gitignore ." }, "dependencies": { "@amplitude/analytics-browser": "^1.9.4", @@ -50,7 +52,6 @@ "next": "13.0.2", "next-router-mock": "^0.9.9", "papaparse": "^5.4.1", - "prettier": "^2.8.2", "react": "^18.2.0", "react-dom": "^18.2.0", "react-force-graph": "^1.43.0", @@ -80,6 +81,8 @@ "jest": "^29.5.0", "jest-environment-jsdom": "^29.5.0", "postcss": "^8.4.18", + "prettier": "^3.2.5", + "prettier-plugin-tailwindcss": "^0.5.11", "react-test-renderer": "^18.2.0", "tailwindcss": "^3.2.2" } diff --git a/postcss.config.js b/postcss.config.js index 33ad091d..12a703d9 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/src/components/announcements/TcAnnouncementsAlert.tsx b/src/components/announcements/TcAnnouncementsAlert.tsx index be5f9b7b..674cd56e 100644 --- a/src/components/announcements/TcAnnouncementsAlert.tsx +++ b/src/components/announcements/TcAnnouncementsAlert.tsx @@ -37,7 +37,7 @@ function TcAnnouncementsAlert() { }} > -
+
diff --git a/src/components/announcements/TcAnnouncementsTable.tsx b/src/components/announcements/TcAnnouncementsTable.tsx index 0fec5768..2ca1d4f0 100644 --- a/src/components/announcements/TcAnnouncementsTable.tsx +++ b/src/components/announcements/TcAnnouncementsTable.tsx @@ -145,7 +145,7 @@ function TcAnnouncementsTable({ switch (cellType) { case 'title': return ( -
+
@@ -167,9 +167,9 @@ function TcAnnouncementsTable({ : ''} } - variant="subtitle2" + variant='subtitle2' /> - + {announcement.data .reduce((unique: string[], item: AnnouncementData) => { const itemType = item.type; @@ -181,7 +181,7 @@ function TcAnnouncementsTable({ .map((type: string, index: React.Key | null | undefined) => ( } - size="small" + size='small' sx={{ borderRadius: '4px', borderColor: '#D1D1D1', @@ -212,7 +212,7 @@ function TcAnnouncementsTable({ ); case 'channels': return ( -
+
text !== '') .join('')} - variant="subtitle2" + variant='subtitle2' />
); @@ -286,13 +286,13 @@ function TcAnnouncementsTable({ // ); case 'scheduledAt': return ( -
+
); @@ -300,16 +300,16 @@ function TcAnnouncementsTable({ return ( <> handleClick(event, announcement.id)} > @@ -396,34 +396,34 @@ function TcAnnouncementsTable({ return ( <> - +
- + - + {/* */} - + @@ -491,36 +491,36 @@ function TcAnnouncementsTable({ }} children={ <> -
+
setDeleteConfirmDialogOpen(false)} />
-
+
-
+
-
+
setDeleteConfirmDialogOpen(false)} /> selectedAnnouncementId && handleDeleteAnnouncements(selectedAnnouncementId) diff --git a/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx b/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx index 3e06c7ac..5b1eee69 100644 --- a/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx +++ b/src/components/announcements/TcConfirmSchaduledAnnouncementsDialog.tsx @@ -46,7 +46,7 @@ function TcConfirmSchaduledAnnouncementsDialog({ <> setConfirmSchadulerDialog(true)} /> @@ -62,36 +62,36 @@ function TcConfirmSchaduledAnnouncementsDialog({ }} children={ <> -
+
setConfirmSchadulerDialog(false)} />
-
+
-
-
- +
+
+
-
-
+
+
{selectedChannels @@ -107,13 +107,13 @@ function TcConfirmSchaduledAnnouncementsDialog({ .join(', ')}
{selectedUsernames && selectedUsernames.length > 0 ? ( -
-
+
+
{' '}
{selectedChannels @@ -132,13 +132,13 @@ function TcConfirmSchaduledAnnouncementsDialog({ '' )} {selectedRoles && selectedRoles.length > 0 ? ( -
-
+
+
{selectedRoles.map((role) => `#${role.name}`).join(', ')} @@ -155,10 +155,10 @@ function TcConfirmSchaduledAnnouncementsDialog({ '' )}
-
+
{ setConfirmSchadulerDialog(false); handleCreateAnnouncements(false); diff --git a/src/components/announcements/TcTimeZone.tsx b/src/components/announcements/TcTimeZone.tsx index b9fdc857..2b85b42c 100644 --- a/src/components/announcements/TcTimeZone.tsx +++ b/src/components/announcements/TcTimeZone.tsx @@ -55,14 +55,14 @@ function TcTimeZone({ handleZone }: ITcTimeZoneProps) { }, [activeZone]); return ( -
+
} + startIcon={} aria-describedby={id} onClick={handleClick} /> @@ -75,18 +75,18 @@ function TcTimeZone({ handleZone }: ITcTimeZoneProps) { style: { width: 'auto' }, }} content={ -
-
+
+
+ ), @@ -94,19 +94,19 @@ function TcTimeZone({ handleZone }: ITcTimeZoneProps) { onChange={searchZones} />
-
    +
      {zones.length > 0 ? ( zones.map((el) => (
    • handleTimeZoneSelect(el)} >
      {el}
    • )) ) : ( -
      +
      Not founded
      )} diff --git a/src/components/announcements/create/TcIconContainer.tsx b/src/components/announcements/create/TcIconContainer.tsx index 4b5c68a0..6020709f 100644 --- a/src/components/announcements/create/TcIconContainer.tsx +++ b/src/components/announcements/create/TcIconContainer.tsx @@ -22,7 +22,7 @@ interface ITcIconContainerProps { */ function TcIconContainer({ children }: ITcIconContainerProps): JSX.Element { return ( -
      +
      {children}
      ); diff --git a/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx b/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx index 5d7f4a9f..28b94082 100644 --- a/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx +++ b/src/components/announcements/create/privateMessaageContainer/TcPrivateMessageContainer.tsx @@ -134,19 +134,19 @@ function TcPrivateMessageContainer({ }, [isEdit, privateAnnouncementsData]); return ( -
      -
      -
      +
      +
      +
      } label={ -
      +
      -
      +
      {messageTypesArray.map((el) => (
      {privateMessage && ( -
      +
      - +
      -
      +
      - +
      - + -
      +
      setPreviewDialogOpen(false)} />
      -
      +
      -
      -
      +
      +
      {selectedRoles && selectedRoles.map((role, index, array) => ( - + {'@'} {index < array.length - 1 && ', '} ))}
      -
      +
      {selectedUsernames && selectedUsernames.map((username, index, array) => ( - + {'#'} {index < array.length - 1 && ', '} @@ -107,13 +107,13 @@ function TcPublicMessagePreviewDialog({
      -
      +
      setPreviewDialogOpen(false)} sx={{ width: '100%' }} /> diff --git a/src/components/announcements/create/privateMessaageContainer/TcRolesAutoComplete.tsx b/src/components/announcements/create/privateMessaageContainer/TcRolesAutoComplete.tsx index 9fa74550..ab807cc8 100644 --- a/src/components/announcements/create/privateMessaageContainer/TcRolesAutoComplete.tsx +++ b/src/components/announcements/create/privateMessaageContainer/TcRolesAutoComplete.tsx @@ -157,7 +157,7 @@ function TcRolesAutoComplete({ multiple={true} loading={isLoading} loadingText={ -
      +
      } @@ -175,7 +175,7 @@ function TcRolesAutoComplete({ renderTags={(value, getTagProps) => value.map((option, index) => ( } - size="small" + size='small' sx={{ borderRadius: '4px', borderColor: '#D1D1D1', diff --git a/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx b/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx index 7ffc8edc..66a3a9f1 100644 --- a/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx +++ b/src/components/announcements/create/privateMessaageContainer/TcUsersAutoComplete.tsx @@ -165,7 +165,7 @@ function TcUsersAutoComplete({ multiple={true} loading={isLoading} loadingText={ -
      +
      } @@ -185,7 +185,7 @@ function TcUsersAutoComplete({ disableCloseOnSelect renderOption={(props, option) => (
    • -
      +
    • @@ -208,9 +208,9 @@ function TcUsersAutoComplete({ renderTags={(value, getTagProps) => value.map((option, index) => ( +
      - +
      } - size="small" + size='small' sx={{ borderRadius: '4px', borderColor: '#D1D1D1', diff --git a/src/components/announcements/create/publicMessageContainer/TcPublicMessageContainer.tsx b/src/components/announcements/create/publicMessageContainer/TcPublicMessageContainer.tsx index fba55ba9..274f7e22 100644 --- a/src/components/announcements/create/publicMessageContainer/TcPublicMessageContainer.tsx +++ b/src/components/announcements/create/publicMessageContainer/TcPublicMessageContainer.tsx @@ -119,13 +119,13 @@ function TcPublicMessageContainer({ }; return ( -
      -
      -
      +
      +
      +
      - +
      channel.label)} />
      -
      - - Select Channels +
      + + Select Channels -
      -
      +
      +
      -
      +
      @@ -168,26 +168,26 @@ function TcPublicMessageContainer({ {showError && ( )} -
      - +
      +
      - + { it('preview button is disabled when isPreviewDialogEnabled is false', () => { render( ); diff --git a/src/components/announcements/create/publicMessageContainer/TcPublicMessagePreviewDialog.tsx b/src/components/announcements/create/publicMessageContainer/TcPublicMessagePreviewDialog.tsx index 15274c87..9dd19318 100644 --- a/src/components/announcements/create/publicMessageContainer/TcPublicMessagePreviewDialog.tsx +++ b/src/components/announcements/create/publicMessageContainer/TcPublicMessagePreviewDialog.tsx @@ -19,8 +19,8 @@ function TcPublicMessagePreviewDialog({ return ( <> -
      +
      setPreviewDialogOpen(false)} />
      -
      +
      -
      +
      {selectedChannels && selectedChannels.map((channel, index, array) => ( - + {'#'} {index < array.length - 1 && ', '} @@ -79,13 +79,13 @@ function TcPublicMessagePreviewDialog({
      -
      +
      setPreviewDialogOpen(false)} sx={{ width: '100%' }} /> diff --git a/src/components/announcements/create/scheduleAnnouncement/TcDateTimePopover.tsx b/src/components/announcements/create/scheduleAnnouncement/TcDateTimePopover.tsx index fbe8f715..1baa3fb1 100644 --- a/src/components/announcements/create/scheduleAnnouncement/TcDateTimePopover.tsx +++ b/src/components/announcements/create/scheduleAnnouncement/TcDateTimePopover.tsx @@ -41,8 +41,8 @@ function TcDateTimePopover({ const tabContent = [ , +
      {tabContent[activeTab]} setActiveTab(newValue)} - indicatorColor="secondary" - className="w-full border-t border-gray-200" + indicatorColor='secondary' + className='w-full border-t border-gray-200' > } - className="w-1/2" - data-testid="calendar-icon" + className='w-1/2' + data-testid='calendar-icon' /> } - className="w-1/2" - data-testid="time-icon" + className='w-1/2' + data-testid='time-icon' />
      diff --git a/src/components/announcements/create/scheduleAnnouncement/TcScheduleAnnouncement.tsx b/src/components/announcements/create/scheduleAnnouncement/TcScheduleAnnouncement.tsx index 394f88f4..1f317c10 100644 --- a/src/components/announcements/create/scheduleAnnouncement/TcScheduleAnnouncement.tsx +++ b/src/components/announcements/create/scheduleAnnouncement/TcScheduleAnnouncement.tsx @@ -94,28 +94,28 @@ function TcScheduleAnnouncement({ }, [isEdit, preSelectedTime]); return ( -
      -
      -
      +
      +
      +
      - + - +
      } disableElevation={true} - className="border border-black bg-gray-100 shadow-md" + className='border border-black bg-gray-100 shadow-md' sx={{ color: 'black', height: '2.4rem', paddingX: '1rem' }} aria-describedby={id} onClick={handleOpen} /> {!isDateValid && ( )} +
      - - Select Platform + + Select Platform diff --git a/src/components/centric/selectCommunity/TcCommunityListItems.tsx b/src/components/centric/selectCommunity/TcCommunityListItems.tsx index eba8f610..e1e83230 100644 --- a/src/components/centric/selectCommunity/TcCommunityListItems.tsx +++ b/src/components/centric/selectCommunity/TcCommunityListItems.tsx @@ -76,10 +76,10 @@ function TcCommunityListItems({ return ( ); } @@ -89,27 +89,27 @@ function TcCommunityListItems({ if (communities.length === 0) { return ( -
      - +
      +
      ); } return ( -
      +
      {communities.map((community, index) => (
      setSelectedCommunity(community)} > {community?.avatarURL ? ( - + ) : ( - + {renderPlatformAvatar(community)} )} diff --git a/src/components/centric/selectCommunity/TcSelectCommunity.tsx b/src/components/centric/selectCommunity/TcSelectCommunity.tsx index d4b304db..5a71ce3c 100644 --- a/src/components/centric/selectCommunity/TcSelectCommunity.tsx +++ b/src/components/centric/selectCommunity/TcSelectCommunity.tsx @@ -71,24 +71,24 @@ function TcSelectCommunity() { } return ( -
      +
      -
      +
      debouncedFetchCommunities(e.target.value)} />
      @@ -104,29 +104,29 @@ function TcSelectCommunity() { )} } - className="md:w-3/5 mx-auto border border-custom-gray min-h-[20rem] max-h-[25rem] overflow-y-scroll rounded-lg" + className='border-custom-gray mx-auto max-h-[25rem] min-h-[20rem] overflow-y-scroll rounded-lg border md:w-3/5' /> -
      +
      } - text="Create" + text='Create' sx={{ width: '15rem', padding: '0.5rem' }} - variant="outlined" + variant='outlined' onClick={() => router.push('/centric/create-new-community')} />
      diff --git a/src/components/communitySettings/TcIntegrationCard.tsx b/src/components/communitySettings/TcIntegrationCard.tsx index 287ae8b9..fccff753 100644 --- a/src/components/communitySettings/TcIntegrationCard.tsx +++ b/src/components/communitySettings/TcIntegrationCard.tsx @@ -10,9 +10,9 @@ function TcIntegrationCard({ children, ...props }: ITcIntegrationCardProps) { return ( ); diff --git a/src/components/communitySettings/communityIntegrations/TcAvailableIntegrations.tsx b/src/components/communitySettings/communityIntegrations/TcAvailableIntegrations.tsx index 9d302bc7..e8f89e91 100644 --- a/src/components/communitySettings/communityIntegrations/TcAvailableIntegrations.tsx +++ b/src/components/communitySettings/communityIntegrations/TcAvailableIntegrations.tsx @@ -4,7 +4,7 @@ import { IntegrationPlatform } from '../../../utils/enums'; function TcAvailableIntegrations() { return ( -
      +
      {Object.values(IntegrationPlatform).map((platform, index) => ( -
      - -
      +
      + +
      } - className="max-w-full" - size="small" + className='max-w-full' + size='small' onClick={() => integratePlatform()} />
      @@ -50,8 +50,8 @@ function TcAvailableIntegrationsItem({ {disabled && ( diff --git a/src/components/communitySettings/communityIntegrations/TcCommunityIntegrations.tsx b/src/components/communitySettings/communityIntegrations/TcCommunityIntegrations.tsx index 7f5ee6e2..bac4bfe4 100644 --- a/src/components/communitySettings/communityIntegrations/TcCommunityIntegrations.tsx +++ b/src/components/communitySettings/communityIntegrations/TcCommunityIntegrations.tsx @@ -49,17 +49,17 @@ function TcCommunityIntegrations() { return ( <> - -
      + +
      {fetchedPlatforms?.results.length > 0 ? ( -
      +
      {loading ? ( - + ) : ( <> +
      diff --git a/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsConfirmDialog.tsx b/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsConfirmDialog.tsx index f3b27f8c..b58de451 100644 --- a/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsConfirmDialog.tsx +++ b/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsConfirmDialog.tsx @@ -33,26 +33,26 @@ function TcCommunityIntegrationsConfirmDialog({ }, }} > -
      +
      toggleDialog()} />
      -
      -
      - +
      +
      +
      - + -
      +
      handleCloseDialog()} />
      diff --git a/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsDialog.tsx b/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsDialog.tsx index 15d6fe9b..4de5c86f 100644 --- a/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsDialog.tsx +++ b/src/components/communitySettings/communityIntegrations/TcCommunityIntegrationsDialog.tsx @@ -76,43 +76,43 @@ function TcCommunityIntegrationsDialog() { }} > {loading ? ( -
      - +
      +
      ) : ( <> {' '} -
      +
      setOpenDialog(false)} />
      -
      -
      +
      +
      setPlatfromAnalyzerDate(date)} />
      -
      +
      -
      +
      diff --git a/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.spec.tsx b/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.spec.tsx index 5a819c9d..0fd1513f 100644 --- a/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.spec.tsx +++ b/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.spec.tsx @@ -11,7 +11,7 @@ jest.mock('./TcConnectedPlatformsItem', () => { platform: any; }) { return ( -
      +
      {/* Render the platform's name for testing purposes */} {platform.name}
      diff --git a/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.tsx b/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.tsx index 9002121b..902ceeef 100644 --- a/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.tsx +++ b/src/components/communitySettings/communityIntegrations/TcConnectedPlatforms.tsx @@ -10,7 +10,7 @@ function TcConnectedPlatforms({ connectedPlatforms, }: IConnectedPlatformsProps) { return ( -
      +
      {connectedPlatforms?.map((platform: IPlatformProps, index: number) => ( ))} diff --git a/src/components/communitySettings/communityIntegrations/TcConnectedPlatformsItem.tsx b/src/components/communitySettings/communityIntegrations/TcConnectedPlatformsItem.tsx index 8a3fc5a2..985664b5 100644 --- a/src/components/communitySettings/communityIntegrations/TcConnectedPlatformsItem.tsx +++ b/src/components/communitySettings/communityIntegrations/TcConnectedPlatformsItem.tsx @@ -68,9 +68,9 @@ function TcConnectedPlatformsItem({ platform }: TcConnectedPlatformsItemProps) { return ( <> -
      +
      router.push( `/community-settings/platform/?platformId=${platform.id}` @@ -78,19 +78,19 @@ function TcConnectedPlatformsItem({ platform }: TcConnectedPlatformsItemProps) { } />
      -
      -
      -
      +
      +
      +
      -
      +
      {platform && ( -
      +
      )} diff --git a/src/components/communitySettings/platform/TcCommunityName.tsx b/src/components/communitySettings/platform/TcCommunityName.tsx index 3b6fc2a3..f37d4618 100644 --- a/src/components/communitySettings/platform/TcCommunityName.tsx +++ b/src/components/communitySettings/platform/TcCommunityName.tsx @@ -35,10 +35,10 @@ function TcCommunityName({ platform }: TccommunityName) { return ( ); } @@ -47,25 +47,25 @@ function TcCommunityName({ platform }: TccommunityName) { }; return ( -
      +
      {community && community.avatarURL ? ( ) : ( - + {community ? renderPlatformAvatar(community) : } )} -
      - +
      +
      diff --git a/src/components/communitySettings/platform/TcDisconnectPlatform.tsx b/src/components/communitySettings/platform/TcDisconnectPlatform.tsx index bc42275f..82169aa9 100644 --- a/src/components/communitySettings/platform/TcDisconnectPlatform.tsx +++ b/src/components/communitySettings/platform/TcDisconnectPlatform.tsx @@ -34,7 +34,7 @@ function TcDisconnectPlatform({ platform }: TcDisconnectPlatformProps) { <> setOpenDialog(true)} /> @@ -51,64 +51,64 @@ function TcDisconnectPlatform({ platform }: TcDisconnectPlatformProps) { }, }} > -
      +
      setOpenDialog(false)} />
      -
      -
      +
      +
      -
      -
      +
      +
      Importing activities and members will be stopped. Historical activities will be deleted. } - variant="body2" + variant='body2' /> handleDeletePlatform('hard')} />
      -
      +
      Importing activities and members will be stopped. Historical activities will not be affected. } - variant="body2" + variant='body2' /> handleDeletePlatform('soft')} />
      diff --git a/src/components/communitySettings/platform/TcPlatform.tsx b/src/components/communitySettings/platform/TcPlatform.tsx index 86aa358b..612398e4 100644 --- a/src/components/communitySettings/platform/TcPlatform.tsx +++ b/src/components/communitySettings/platform/TcPlatform.tsx @@ -145,12 +145,12 @@ function TcPlatform({ platformName = 'Discord' }: TcPlatformProps) { return ( -
      -
      +
      +
      +
      - +
      @@ -161,10 +161,10 @@ function TcPlatform({ platformName = 'Discord' }: TcPlatformProps) { onDateChange={handleDateChange} /> -
      +
      diff --git a/src/components/communitySettings/platform/TcPlatformChannelDialog.tsx b/src/components/communitySettings/platform/TcPlatformChannelDialog.tsx index e705a215..011563da 100644 --- a/src/components/communitySettings/platform/TcPlatformChannelDialog.tsx +++ b/src/components/communitySettings/platform/TcPlatformChannelDialog.tsx @@ -21,14 +21,14 @@ function TcPlatformChannelDialog() {
      -
      +
      -
      - +
      + setOpenDialog(false)} />
      -
      +
      -
      +
      setOpenDialog(false)} /> diff --git a/src/components/communitySettings/platform/TcPlatformChannelDialogBody.tsx b/src/components/communitySettings/platform/TcPlatformChannelDialogBody.tsx index f4e5a677..56a75014 100644 --- a/src/components/communitySettings/platform/TcPlatformChannelDialogBody.tsx +++ b/src/components/communitySettings/platform/TcPlatformChannelDialogBody.tsx @@ -3,7 +3,7 @@ import TcPlatformChannelList from './TcPlatformChannelList'; function TcPlatformChannelDialogBody() { return ( -
      +
      ); diff --git a/src/components/communitySettings/platform/TcPlatformChannelDialogFooter.tsx b/src/components/communitySettings/platform/TcPlatformChannelDialogFooter.tsx index 3d90dd1f..bf1ac8dd 100644 --- a/src/components/communitySettings/platform/TcPlatformChannelDialogFooter.tsx +++ b/src/components/communitySettings/platform/TcPlatformChannelDialogFooter.tsx @@ -7,22 +7,22 @@ function TcPlatformChannelDialogFooter() {
      } + expandIcon={} > -

      +

      How to give access to the channel you want to import?

      -
      -
        +
        +
        1. Navigate to the channel you want to import on{' '} Discord diff --git a/src/components/communitySettings/platform/TcPlatformChannelDialogHeader.tsx b/src/components/communitySettings/platform/TcPlatformChannelDialogHeader.tsx index 05efdafe..1deb3f2f 100644 --- a/src/components/communitySettings/platform/TcPlatformChannelDialogHeader.tsx +++ b/src/components/communitySettings/platform/TcPlatformChannelDialogHeader.tsx @@ -3,12 +3,12 @@ import TcText from '../../shared/TcText'; function TcPlatformChannelDialogHeader() { return ( -
          +
          ); diff --git a/src/components/communitySettings/platform/TcPlatformChannelList.tsx b/src/components/communitySettings/platform/TcPlatformChannelList.tsx index 13bd52e4..881a2acf 100644 --- a/src/components/communitySettings/platform/TcPlatformChannelList.tsx +++ b/src/components/communitySettings/platform/TcPlatformChannelList.tsx @@ -42,29 +42,29 @@ function TcPlatformChannelList({ }; if (loading) { - return ; + return ; } if (channels.length === 0) { return ( -
          +
          ); } return ( -
          +
          {refreshTrigger ? ( } sx={{ maxWidth: '10rem' }} - variant="outlined" + variant='outlined' onClick={handleRefresh} text={'Refresh List'} /> @@ -79,8 +79,8 @@ function TcPlatformChannelList({ {channels && channels?.map((channel, index) => (
          - -
          + +
          } - label="All Channels" + label='All Channels' /> - + {channel.subChannels.map((subChannel, index) => (
          {!subChannel.canReadMessageHistoryAndViewChannel ? ( -
          - +
          +
          ) : ( diff --git a/src/components/communitySettings/platform/TcPlatformChannels.tsx b/src/components/communitySettings/platform/TcPlatformChannels.tsx index 94af1031..127739f2 100644 --- a/src/components/communitySettings/platform/TcPlatformChannels.tsx +++ b/src/components/communitySettings/platform/TcPlatformChannels.tsx @@ -6,11 +6,11 @@ import TcPlatformChannelDialog from './TcPlatformChannelDialog'; function TcPlatformChannels() { return (
          -
          - - +
          + + -
          +
          diff --git a/src/components/communitySettings/platform/TcPlatformPeriod.tsx b/src/components/communitySettings/platform/TcPlatformPeriod.tsx index a92b0dc4..6a322ca7 100644 --- a/src/components/communitySettings/platform/TcPlatformPeriod.tsx +++ b/src/components/communitySettings/platform/TcPlatformPeriod.tsx @@ -19,30 +19,30 @@ function TcPlatformPeriod({ onDateChange, platform }: ITcPlatformPeriodProps) { return (
          -
          - - +
          + + -
          +
          -
          +
          ); } @@ -120,19 +119,19 @@ function TcActiveCommunity() { if (loading) { return ( -
          - +
          +
          ); } return ( -
          -
          +
          +
          {community && community.avatarURL ? ( - + ) : ( - + {community ? ( renderPlatformAvatar(community) ) : ( @@ -141,13 +140,13 @@ function TcActiveCommunity() { )} {loading ? ( - + ) : ( { setOpenDialog(true); @@ -81,36 +81,36 @@ function TcConfirmDeleteCommunity({ }, }} > -
          +
          setOpenDialog(false)} />
          {activeStep === 1 ? ( -
          -
          -
          - +
          +
          +
          +
          - + If you don't read this, unexpected bad things will happen!{' '} Once the community account is deleted, there is{' '} @@ -120,24 +120,24 @@ function TcConfirmDeleteCommunity({ } /> -
          +
          setOpenDialog(false)} /> setActiveStep(2)} />
          ) : ( -
          +
          To confirm that you want to delete the community, please type{' '} @@ -145,25 +145,25 @@ function TcConfirmDeleteCommunity({ } /> -
          +
          -
          +
          setOpenDialog(false)} /> diff --git a/src/components/communitySettings/switchCommunity/TcSwitchCommunity.tsx b/src/components/communitySettings/switchCommunity/TcSwitchCommunity.tsx index bd1a1701..67816d32 100644 --- a/src/components/communitySettings/switchCommunity/TcSwitchCommunity.tsx +++ b/src/components/communitySettings/switchCommunity/TcSwitchCommunity.tsx @@ -6,12 +6,12 @@ import TcText from '../../shared/TcText'; function TcSwitchCommunity() { return ( -
          -
          - +
          +
          + router.push('/centric/select-community')} /> diff --git a/src/components/global/CustomTab.tsx b/src/components/global/CustomTab.tsx index 99af64eb..0974e146 100644 --- a/src/components/global/CustomTab.tsx +++ b/src/components/global/CustomTab.tsx @@ -23,7 +23,7 @@ function CustomTab({ -
          {image}
          -

          {title}

          -

          {description}

          +
          +
          {image}
          +

          {title}

          +

          {description}

          { router.push('/community-settings'); }} - className="py-2 md:w-1/5 mx-auto" + className='mx-auto py-2 md:w-1/5' />
          ); diff --git a/src/components/global/FilterByChannels.tsx b/src/components/global/FilterByChannels.tsx index c34a220e..3f4b744f 100644 --- a/src/components/global/FilterByChannels.tsx +++ b/src/components/global/FilterByChannels.tsx @@ -36,12 +36,12 @@ const FilterByChannels = ({ const id = open ? 'simple-popover' : undefined; return ( -
          - +
          + @@ -62,25 +62,25 @@ const FilterByChannels = ({ style: { width: '32rem' }, }} > -
          -

          +

          +

          Select channels to view activity

          -
          +
          -
          - +
          + At least one channel needs to be selected. Please select channel.
          -
          +
          { if (handleFetchHeatmapByChannels) { diff --git a/src/components/global/FilterPopover/FilterRolesPopover.tsx b/src/components/global/FilterPopover/FilterRolesPopover.tsx index a7cf1515..4ce28e74 100644 --- a/src/components/global/FilterPopover/FilterRolesPopover.tsx +++ b/src/components/global/FilterPopover/FilterRolesPopover.tsx @@ -239,7 +239,7 @@ function FilterRolesPopover({ handleSelectedRoles }: IFilterRolesPopover) {
          @@ -257,26 +257,26 @@ function FilterRolesPopover({ handleSelectedRoles }: IFilterRolesPopover) { anchorEl={anchorEl} sx={{ maxWidth: '340px' }} content={ -
          +
          {selectedRoles.length > 0 && ( - + } - label={} - className="w-1/2" + label={} + className='w-1/2' /> } - label={} + label={} /> @@ -284,7 +284,7 @@ function FilterRolesPopover({ handleSelectedRoles }: IFilterRolesPopover) { value.map((option, index) => ( @@ -347,21 +347,21 @@ function FilterRolesPopover({ handleSelectedRoles }: IFilterRolesPopover) {
          {fetchedRoles && fetchedRoles.results.length > 0 ? ( <> - + {fetchedRoles?.results?.map((role: IRoles) => ( selectedRole.id === role.id )} @@ -371,9 +371,9 @@ function FilterRolesPopover({ handleSelectedRoles }: IFilterRolesPopover) { label={ role ? ( ))} ) : ( - + )} - {loading ? : ''} + {loading ? : ''}
          } diff --git a/src/components/global/Link.tsx b/src/components/global/Link.tsx index eaff6fc8..0842246e 100644 --- a/src/components/global/Link.tsx +++ b/src/components/global/Link.tsx @@ -7,7 +7,7 @@ type CustomLinkProps = MuiLinkProps & { const Link: React.FC = ({ to, children, ...props }) => { return ( - + {children} ); diff --git a/src/components/global/Loading.tsx b/src/components/global/Loading.tsx index 311dd147..86fa66eb 100644 --- a/src/components/global/Loading.tsx +++ b/src/components/global/Loading.tsx @@ -15,7 +15,7 @@ function Loading({ height = '10rem', size = 40 }: LoadingProps) { height, }} > - + ); } diff --git a/src/components/global/LoadingBackdrop.tsx b/src/components/global/LoadingBackdrop.tsx index 80d5bb59..b7aab9d1 100644 --- a/src/components/global/LoadingBackdrop.tsx +++ b/src/components/global/LoadingBackdrop.tsx @@ -11,7 +11,7 @@ export default function SimpleBackdrop() { top: '-4rem', }} > - + ); } diff --git a/src/components/global/RangeSelect.tsx b/src/components/global/RangeSelect.tsx index 321660b5..c75c4816 100644 --- a/src/components/global/RangeSelect.tsx +++ b/src/components/global/RangeSelect.tsx @@ -14,9 +14,9 @@ type optionItem = { const RangeSelect = ({ options, icon, onClick, active }: Props) => { return ( <> -
          -
            -
            {icon}
            +
            +
              +
              {icon}
              {options.length > 0 ? options.map((el) => (
            • { key={el.value} className={ active === el.value - ? 'py-1 px-2 whitespace-nowrap md:px-1.5 text-sm rounded-md bg-white text-light-gray cursor-pointer hover:bg-lite' - : 'py-1 px-3 whitespace-nowrap md:px-1.5 text-sm rounded-md cursor-pointer text-light-gray hover:bg-lite' + ? 'text-light-gray cursor-pointer whitespace-nowrap rounded-md bg-white py-1 px-2 text-sm hover:bg-lite md:px-1.5' + : 'text-light-gray cursor-pointer whitespace-nowrap rounded-md py-1 px-3 text-sm hover:bg-lite md:px-1.5' } >
              {el.title}
              diff --git a/src/components/global/SEO.tsx b/src/components/global/SEO.tsx index 70e38cf8..0585db05 100644 --- a/src/components/global/SEO.tsx +++ b/src/components/global/SEO.tsx @@ -14,11 +14,11 @@ const SEO: FC = ({ }): JSX.Element => ( - + {titleTemplate} | {title} - + ); diff --git a/src/components/global/TcPermissionHints/TcPermissionHints.tsx b/src/components/global/TcPermissionHints/TcPermissionHints.tsx index 10d023d7..262f7286 100644 --- a/src/components/global/TcPermissionHints/TcPermissionHints.tsx +++ b/src/components/global/TcPermissionHints/TcPermissionHints.tsx @@ -23,57 +23,57 @@ function PermissionHints() { switch (category) { case 'Access Settings': return ( -
              +
              -
                +
                1. -
                    +
                    • - +
                    • - +
                -
                  +
                  1. -
                      +
                      • - +
                      • - +
                      • - +
                      • - +
                      • - +
                      • - +
                      @@ -83,12 +83,12 @@ function PermissionHints() { ); case 'Server Level': return ( -
                      +
                      -
                        +
                        1. } - variant="body2" + variant='body2' />
                        2. @@ -108,7 +108,7 @@ function PermissionHints() { the middle of the screen check Advanced permissions } - variant="body2" + variant='body2' />
                        3. @@ -120,20 +120,20 @@ function PermissionHints() { [✓] } - variant="body2" + variant='body2' /> -
                            +
                            @@ -147,18 +147,18 @@ function PermissionHints() { you } - variant="body2" + variant='body2' />
                      ); case 'Category Level': return ( -
                      +
                      -
                        +
                        1. } - variant="body2" + variant='body2' />
                        2. @@ -178,7 +178,7 @@ function PermissionHints() { the middle of the screen check Advanced permissions } - variant="body2" + variant='body2' />
                        3. @@ -190,20 +190,20 @@ function PermissionHints() { [✓] } - variant="body2" + variant='body2' /> -
                            +
                            @@ -217,18 +217,18 @@ function PermissionHints() { you } - variant="body2" + variant='body2' />
                      ); case 'Channel Level': return ( -
                      +
                      -
                        +
                        1. } - variant="body2" + variant='body2' />
                        2. @@ -248,7 +248,7 @@ function PermissionHints() { the middle of the screen check Advanced permissions } - variant="body2" + variant='body2' />
                        3. @@ -260,20 +260,20 @@ function PermissionHints() { [✓] } - variant="body2" + variant='body2' /> -
                            +
                            @@ -287,7 +287,7 @@ function PermissionHints() { you } - variant="body2" + variant='body2' />
                      ); @@ -298,7 +298,7 @@ function PermissionHints() { return (
                      - + {permissionCategories.map((category) => ( ))} -
                      {getDescription(activeCategory)}
                      +
                      {getDescription(activeCategory)}
                      ); } diff --git a/src/components/global/ZonePicker.tsx b/src/components/global/ZonePicker.tsx index 250edc9c..d89fe417 100644 --- a/src/components/global/ZonePicker.tsx +++ b/src/components/global/ZonePicker.tsx @@ -44,12 +44,12 @@ const ZonePicker = ({ selectedZone, handleSelectedZone }: IProps) => { }; return ( -
                      - +
                      + @@ -70,24 +70,24 @@ const ZonePicker = ({ selectedZone, handleSelectedZone }: IProps) => { style: { width: '26rem' }, }} > -
                      -
                      +
                      +
                      -
                        +
                          {zones.length > 0 ? ( zones.map((el) => (
                        • ( handleSelectedZone(el), setAnchorEl(null), @@ -95,8 +95,8 @@ const ZonePicker = ({ selectedZone, handleSelectedZone }: IProps) => { )} >
                          {el}
                          -
                          -
                          +
                          +
                          {moment.tz(moment(), el).format('z,Z')}
                          {moment.tz(moment(), el).format('H a')}
                          @@ -104,7 +104,7 @@ const ZonePicker = ({ selectedZone, handleSelectedZone }: IProps) => {
                        • )) ) : ( -
                          +
                          Not founded
                          )} diff --git a/src/components/layouts/Sidebar.tsx b/src/components/layouts/Sidebar.tsx index 64cfeffa..456201a0 100644 --- a/src/components/layouts/Sidebar.tsx +++ b/src/components/layouts/Sidebar.tsx @@ -82,30 +82,30 @@ const Sidebar = () => { ]; const menuItem = menuItems.map((el) => ( -
                        • +
                        • {el.icon}
                          -

                          {el.name}

                          +

                          {el.name}

                        • )); return ( -
+
{columns.map((column, columnIndex) => ( @@ -266,8 +266,8 @@ const CustomTable: React.FC = ({ <> ); } if (props.variant === 'outlined') { return ( ); } diff --git a/src/components/shared/TcDatePickerPopover.tsx b/src/components/shared/TcDatePickerPopover.tsx index 6e00729a..fb165387 100644 --- a/src/components/shared/TcDatePickerPopover.tsx +++ b/src/components/shared/TcDatePickerPopover.tsx @@ -34,18 +34,18 @@ function TcDatePickerPopover({ > -
+
diff --git a/src/components/shared/TcIconWithTooltip.spec.tsx b/src/components/shared/TcIconWithTooltip.spec.tsx index cf0f9705..d352df12 100644 --- a/src/components/shared/TcIconWithTooltip.spec.tsx +++ b/src/components/shared/TcIconWithTooltip.spec.tsx @@ -5,23 +5,23 @@ import TcIconWithTooltip from './TcIconWithTooltip'; describe('', () => { // Test 1: Check if the component renders correctly it('renders without crashing', () => { - render(); + render(); }); // Test 2: Check if the default icon (SVG) is rendered if none is provided it('renders the default SVG icon if none is provided', () => { - render(); + render(); const svgIcon = screen.getByTestId('icon-svg'); // Make sure you add this test-id to your SVG in the component expect(svgIcon).toBeInTheDocument(); }); // Test 3: Check if a custom icon is rendered when provided it('renders a custom icon (SVG) when provided', () => { - const customIcon = ; + const customIcon = ; render( ); const renderedIcon = screen.getByTestId('custom-icon'); diff --git a/src/components/shared/TcIconWithTooltip.tsx b/src/components/shared/TcIconWithTooltip.tsx index be6d2e27..0436a7b1 100644 --- a/src/components/shared/TcIconWithTooltip.tsx +++ b/src/components/shared/TcIconWithTooltip.tsx @@ -26,7 +26,7 @@ interface ITcIconWithTooltip { function TcIconWithTooltip({ iconComponent, tooltipText }: ITcIconWithTooltip) { return ( - +
{iconComponent}
); @@ -34,7 +34,7 @@ function TcIconWithTooltip({ iconComponent, tooltipText }: ITcIconWithTooltip) { TcIconWithTooltip.defaultProps = { iconComponent: ( - + ), }; diff --git a/src/components/shared/TcLink.tsx b/src/components/shared/TcLink.tsx index c7b2d7a3..4ce98ec7 100644 --- a/src/components/shared/TcLink.tsx +++ b/src/components/shared/TcLink.tsx @@ -27,7 +27,7 @@ interface CustomLinkProps extends MuiLinkProps { function TcLink({ children, to, ...props }: CustomLinkProps) { return ( - + {children} ); diff --git a/src/components/shared/TcPagination/TcPagination.tsx b/src/components/shared/TcPagination/TcPagination.tsx index 8a95a1d2..a10c1b09 100644 --- a/src/components/shared/TcPagination/TcPagination.tsx +++ b/src/components/shared/TcPagination/TcPagination.tsx @@ -47,12 +47,12 @@ function TcPagination({ return ( handleChangePage(page)} {...props} - renderItem={(item) => } + renderItem={(item) => } /> ); } diff --git a/src/components/shared/TcSelect/TcSelect.tsx b/src/components/shared/TcSelect/TcSelect.tsx index 124904ca..6227725b 100644 --- a/src/components/shared/TcSelect/TcSelect.tsx +++ b/src/components/shared/TcSelect/TcSelect.tsx @@ -45,7 +45,7 @@ function TcSelect({ value={option.value} disabled={option.disabled} > -
+
{option.icon && React.cloneElement(option.icon)}
diff --git a/src/components/shared/TcTableContainer/TcTableBody.tsx b/src/components/shared/TcTableContainer/TcTableBody.tsx index 67b08449..69802e5b 100644 --- a/src/components/shared/TcTableContainer/TcTableBody.tsx +++ b/src/components/shared/TcTableContainer/TcTableBody.tsx @@ -25,7 +25,7 @@ function TcTableBody({ rowItems, ...props }: ITcTableBodyProps) { diff --git a/src/components/shared/TcTableContainer/TcTableContainer.tsx b/src/components/shared/TcTableContainer/TcTableContainer.tsx index 9e580c73..87591e14 100644 --- a/src/components/shared/TcTableContainer/TcTableContainer.tsx +++ b/src/components/shared/TcTableContainer/TcTableContainer.tsx @@ -28,7 +28,7 @@ function TcTableContainer({ ...props }: ITcTableContainerProps) { return ( -
+
{headers && headers.length > 0 && } {bodyRowItems && bodyRowItems.length > 0 && ( diff --git a/src/components/shared/TcTableContainer/TcTableHead.tsx b/src/components/shared/TcTableContainer/TcTableHead.tsx index f301c81e..7e4fbc57 100644 --- a/src/components/shared/TcTableContainer/TcTableHead.tsx +++ b/src/components/shared/TcTableContainer/TcTableHead.tsx @@ -17,7 +17,7 @@ function TcTableHead({ headers, ...props }: ITcTableHeadProps) { ); diff --git a/src/components/shared/TcTableContainer/TcTableRow.tsx b/src/components/shared/TcTableContainer/TcTableRow.tsx index bcadf15e..d4afe057 100644 --- a/src/components/shared/TcTableContainer/TcTableRow.tsx +++ b/src/components/shared/TcTableContainer/TcTableRow.tsx @@ -32,7 +32,7 @@ function TcTableRow({ className={clsx( customTableCellClasses ? `${customTableCellClasses}` - : `px-1 first:px-3 py-4 first:rounded-l-md first:border-r-0 last:rounded-r-md last:border-l-0` + : `px-1 py-4 first:rounded-l-md first:border-r-0 first:px-3 last:rounded-r-md last:border-l-0` )} > {CustomRenderer ? CustomRenderer(value) : value} diff --git a/src/components/twitter/growth/accountActivity/TcAccountActivity.spec.tsx b/src/components/twitter/growth/accountActivity/TcAccountActivity.spec.tsx index afabbc4c..033b6145 100644 --- a/src/components/twitter/growth/accountActivity/TcAccountActivity.spec.tsx +++ b/src/components/twitter/growth/accountActivity/TcAccountActivity.spec.tsx @@ -9,14 +9,14 @@ import { unmountComponentAtNode } from 'react-dom'; jest.mock('./TcAccountActivityHeader', () => { return { __esModule: true, - default: jest.fn(() =>
), + default: jest.fn(() =>
), }; }); jest.mock('./TcAccountActivityContent', () => { return { __esModule: true, - default: jest.fn(() =>
), + default: jest.fn(() =>
), }; }); diff --git a/src/components/twitter/growth/accountActivity/TcAccountActivityContent.tsx b/src/components/twitter/growth/accountActivity/TcAccountActivityContent.tsx index bd9501ac..97ada8a1 100644 --- a/src/components/twitter/growth/accountActivity/TcAccountActivityContent.tsx +++ b/src/components/twitter/growth/accountActivity/TcAccountActivityContent.tsx @@ -15,24 +15,24 @@ function TcAccountActivityContent({ activityList, }: ITcAccountActivityContentProps) { return ( -
+
{activityList && activityList.map((el, index) => ( - +
+ -
+
{el.hasTooltipInfo ? ( - + ) : ( '' )} diff --git a/src/components/twitter/growth/accountActivity/TcAccountActivityHeader.tsx b/src/components/twitter/growth/accountActivity/TcAccountActivityHeader.tsx index 8fa14290..0a78d58b 100644 --- a/src/components/twitter/growth/accountActivity/TcAccountActivityHeader.tsx +++ b/src/components/twitter/growth/accountActivity/TcAccountActivityHeader.tsx @@ -8,28 +8,28 @@ import { IUser } from '../../../../utils/types'; export default function TcAccountActivityHeader() { const user = StorageService.readLocalStorage('user'); return ( -
+
- -
- + +
+
-
- +
+ {user?.twitter?.twitterUsername ? ( <> - + @{user?.twitter?.twitterUsername} ) : ( - + )}
diff --git a/src/components/twitter/growth/audienceResponse/TcAudienceResponse.tsx b/src/components/twitter/growth/audienceResponse/TcAudienceResponse.tsx index e8b62a31..17533d6b 100644 --- a/src/components/twitter/growth/audienceResponse/TcAudienceResponse.tsx +++ b/src/components/twitter/growth/audienceResponse/TcAudienceResponse.tsx @@ -33,7 +33,7 @@ function TcAudienceResponse({ audience }: ITcAudienceResponseProps) { }, [audience]); return ( -
+
diff --git a/src/components/twitter/growth/audienceResponse/TcAudienceResponseContent.tsx b/src/components/twitter/growth/audienceResponse/TcAudienceResponseContent.tsx index 99874e14..754c569f 100644 --- a/src/components/twitter/growth/audienceResponse/TcAudienceResponseContent.tsx +++ b/src/components/twitter/growth/audienceResponse/TcAudienceResponseContent.tsx @@ -15,26 +15,26 @@ interface ITcAudienceResponseContentProps { function TcAudienceResponseContent({ data }: ITcAudienceResponseContentProps) { return ( -
-
+
+
{data && data.map((el, index) => ( - +
+ -
+
{el.hasTooltipInfo ? ( - + ) : ( '' )} diff --git a/src/components/twitter/growth/audienceResponse/TcAudienceResponseHeader.tsx b/src/components/twitter/growth/audienceResponse/TcAudienceResponseHeader.tsx index ca777dc4..6358ef89 100644 --- a/src/components/twitter/growth/audienceResponse/TcAudienceResponseHeader.tsx +++ b/src/components/twitter/growth/audienceResponse/TcAudienceResponseHeader.tsx @@ -3,12 +3,12 @@ import TcText from '../../../shared/TcText'; function TcAudienceResponseHeader() { return ( -
- +
+
); diff --git a/src/components/twitter/growth/engagementAccounts/TcEngagementAccountContentItems.tsx b/src/components/twitter/growth/engagementAccounts/TcEngagementAccountContentItems.tsx index 12de32e6..ead423ae 100644 --- a/src/components/twitter/growth/engagementAccounts/TcEngagementAccountContentItems.tsx +++ b/src/components/twitter/growth/engagementAccounts/TcEngagementAccountContentItems.tsx @@ -19,31 +19,31 @@ function TcEngagementAccountContentItems({ }: ITcEngagementAccountContentItemsProps) { return (
-
+
{tooltipText && ( } diff --git a/src/components/twitter/growth/engagementAccounts/TcEngagementAccounts.tsx b/src/components/twitter/growth/engagementAccounts/TcEngagementAccounts.tsx index 3685055a..9b4926a9 100644 --- a/src/components/twitter/growth/engagementAccounts/TcEngagementAccounts.tsx +++ b/src/components/twitter/growth/engagementAccounts/TcEngagementAccounts.tsx @@ -56,7 +56,7 @@ function TcEngagementAccounts({ engagement }: ITcEngagementAccountsProps) { }, [engagement]); return ( -
+
diff --git a/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsContent.tsx b/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsContent.tsx index ace180f2..0033c8e6 100644 --- a/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsContent.tsx +++ b/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsContent.tsx @@ -18,7 +18,7 @@ function TcEngagementAccountsContent({ contentItems, }: ITcEngagementAccountsContentProps) { const renderContentItems = (item: IContentItem, index: number) => ( -
+
-
+
+
-
+
-
+
{['High', 'Low'].map((label, index) => (
-
+
{renderContentItems(contentItems[index * 2], index * 2)} {renderContentItems(contentItems[index * 2 + 1], index * 2 + 1)}
diff --git a/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsHeader.tsx b/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsHeader.tsx index db6f4477..0db8fcf6 100644 --- a/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsHeader.tsx +++ b/src/components/twitter/growth/engagementAccounts/TcEngagementAccountsHeader.tsx @@ -4,7 +4,7 @@ import TcText from '../../../shared/TcText'; function TcEngagementAccountsHeader() { return ( <> - + ); } diff --git a/src/components/twitter/growth/voteFeature/TcvoteFeature.tsx b/src/components/twitter/growth/voteFeature/TcvoteFeature.tsx index 2187feae..7eb40bae 100644 --- a/src/components/twitter/growth/voteFeature/TcvoteFeature.tsx +++ b/src/components/twitter/growth/voteFeature/TcvoteFeature.tsx @@ -16,14 +16,14 @@ function TcvoteFeature() { }; return ( -
+
-
+
diff --git a/src/components/twitter/growth/voteFeature/TcvoteFeatureHeader.tsx b/src/components/twitter/growth/voteFeature/TcvoteFeatureHeader.tsx index 7709dbfe..5769e044 100644 --- a/src/components/twitter/growth/voteFeature/TcvoteFeatureHeader.tsx +++ b/src/components/twitter/growth/voteFeature/TcvoteFeatureHeader.tsx @@ -3,11 +3,11 @@ import TcText from '../../../shared/TcText'; function TcAudienceResponseHeader() { return ( -
+
); diff --git a/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotes.tsx b/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotes.tsx index cc065682..c6afc9aa 100644 --- a/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotes.tsx +++ b/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotes.tsx @@ -47,14 +47,14 @@ function TcvoteFeatureVotes({ ); }; return ( -
+
{TcvoteFeatureVotesMockList.map((item, index) => ( handleToggleCheckbox(event, index)} - color="secondary" + color='secondary' /> ))}
diff --git a/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.spec.tsx b/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.spec.tsx index 372e1069..c27fa69b 100644 --- a/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.spec.tsx +++ b/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.spec.tsx @@ -6,8 +6,8 @@ describe('', () => { test('renders correctly', () => { render( @@ -18,8 +18,8 @@ describe('', () => { test('renders checked checkbox based on isChecked prop', () => { const { rerender } = render( @@ -28,8 +28,8 @@ describe('', () => { rerender( @@ -41,8 +41,8 @@ describe('', () => { const mockFn = jest.fn(); render( diff --git a/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.tsx b/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.tsx index faeb10d5..ac31eafa 100644 --- a/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.tsx +++ b/src/components/twitter/growth/voteFeature/TcvoteFeatureVotes/TcvoteFeatureVotesItems.tsx @@ -18,10 +18,10 @@ function TcvoteFeatureVotesItems({ ...props }: ITcvoteFeatureVotesItemsProps) { return ( -
+
} + label={} control={ +
diff --git a/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityContent.tsx b/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityContent.tsx index 5e57ded6..a9f6c4d1 100644 --- a/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityContent.tsx +++ b/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityContent.tsx @@ -15,26 +15,26 @@ function TcYourAccountActivityContent({ data, }: IYourAccountActivityContentProps) { return ( -
-
+
+
{data && data.map((el, index) => ( - +
+ -
+
{el.hasTooltipInfo ? ( - + ) : null}
diff --git a/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityHeader.tsx b/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityHeader.tsx index 0f4b2f26..23317b0a 100644 --- a/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityHeader.tsx +++ b/src/components/twitter/growth/yourAccountActivity/TcYourAccountActivityHeader.tsx @@ -6,13 +6,13 @@ import TcLink from '../../../shared/TcLink'; function TcYourAccountActivityHeader() { return ( -
-
- +
+
+
diff --git a/src/context/ChannelContext.tsx b/src/context/ChannelContext.tsx index deb54d0f..b6894497 100644 --- a/src/context/ChannelContext.tsx +++ b/src/context/ChannelContext.tsx @@ -149,14 +149,17 @@ export const ChannelProvider = ({ children }: ChannelProviderProps) => { selectedSubChannels[channelId]?.[subChannel.channelId] ); - const newSubChannelsState = subChannels.reduce((acc, subChannel) => { - if (subChannel.canReadMessageHistoryAndViewChannel) { - acc[subChannel.channelId] = !allSelected; - } else { - acc[subChannel.channelId] = false; - } - return acc; - }, {} as { [subChannelId: string]: boolean }); + const newSubChannelsState = subChannels.reduce( + (acc, subChannel) => { + if (subChannel.canReadMessageHistoryAndViewChannel) { + acc[subChannel.channelId] = !allSelected; + } else { + acc[subChannel.channelId] = false; + } + return acc; + }, + {} as { [subChannelId: string]: boolean } + ); setSelectedSubChannels((prev) => ({ ...prev, diff --git a/src/layouts/centricLayout.tsx b/src/layouts/centricLayout.tsx index fe0ee30c..6783b99e 100644 --- a/src/layouts/centricLayout.tsx +++ b/src/layouts/centricLayout.tsx @@ -9,12 +9,12 @@ interface ICentricLayout { function centricLayout({ children }: ICentricLayout) { return ( - + - + {children} diff --git a/src/layouts/defaultLayout.tsx b/src/layouts/defaultLayout.tsx index 2ed3c239..a4932257 100644 --- a/src/layouts/defaultLayout.tsx +++ b/src/layouts/defaultLayout.tsx @@ -11,10 +11,10 @@ export const defaultLayout = ({ children }: IDefaultLayoutProps) => { return ( <> -
+
-
{children}
+
{children}
); diff --git a/src/layouts/emptyLayout.tsx b/src/layouts/emptyLayout.tsx index 262f5526..4bad4304 100644 --- a/src/layouts/emptyLayout.tsx +++ b/src/layouts/emptyLayout.tsx @@ -1,4 +1,4 @@ -import React from "react"; +import React from 'react'; type Props = { children: React.ReactNode; @@ -7,7 +7,7 @@ type Props = { export const emptyLayout = ({ children }: Props) => { return ( <> -
+
{children}
diff --git a/src/lib/attributes/Menu.ts b/src/lib/attributes/Menu.ts index ab3d7841..5f85b8c9 100644 --- a/src/lib/attributes/Menu.ts +++ b/src/lib/attributes/Menu.ts @@ -1,8 +1,8 @@ -const menu =[ - { - name:'test', - path:'/', - } -] +const menu = [ + { + name: 'test', + path: '/', + }, +]; -export default menu; \ No newline at end of file +export default menu; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index ea9dc52d..00f7011c 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -44,7 +44,7 @@ export default function App({ Component, pageProps }: ComponentWithPageLayout) { <> -