Skip to content

Commit

Permalink
whatever
Browse files Browse the repository at this point in the history
  • Loading branch information
robertschnuell committed Feb 28, 2024
1 parent 1467fc1 commit 11098e3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
6 changes: 3 additions & 3 deletions components/UI/CopyToClipboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useTranslation } from 'react-i18next';
import { RiCheckLine, RiClipboardLine } from '@remixicon/react';

import Icon from './Icon';
import { Button } from '@/components/UI/shadcn/Button';
import TextButton from '@/components/UI/TextButton';

const CopyToClipboard = ({ content, title }) => {
const [wasContentCopied, setWasContentCopied] = useState(false);
Expand All @@ -17,7 +17,7 @@ const CopyToClipboard = ({ content, title }) => {
};

return (
<Button variant="ghost" title={title || t('Copy link to clipboard')} onClick={copyToClipboard}>
<TextButton variant="ghost" title={title || t('Copy link to clipboard')} onClick={copyToClipboard}>
{wasContentCopied ? (
<Icon>
<RiCheckLine />
Expand All @@ -27,7 +27,7 @@ const CopyToClipboard = ({ content, title }) => {
<RiClipboardLine />
</Icon>
)}
</Button>
</TextButton>
);
};

Expand Down
23 changes: 11 additions & 12 deletions pages/chat/[[...roomId]].js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { useTranslation } from 'react-i18next';
import getConfig from 'next/config';
import { useRouter } from 'next/router';
import { RiChatNewLine, RiPhoneLine, RiSidebarFoldLine, RiDoorOpenLine, RiUserAddLine } from '@remixicon/react';

Check failure

Code scanning / ESLint

Enforce a convention in module import order. Error

There should be at least one empty line between import groups

import { Button } from '@/components/UI/shadcn/Button';
import TextButton from '@/components/UI/TextButton';
import { InviteUserToMatrixRoom } from '@/components/UI/InviteUsersToMatrixRoom';
import CopyToClipboard from '@/components/UI/CopyToClipboard';
import DefaultLayout from '@/components/layouts/default';
Expand Down Expand Up @@ -150,7 +149,7 @@ export default function Chat() {
<>
<DefaultLayout.Sidebar>
<h2>
<Button
<TextButton
variant="ghost"
onClick={() => {
router.push('/chat/new');
Expand All @@ -160,7 +159,7 @@ export default function Chat() {
<Icon>
<RiChatNewLine />
</Icon>
</Button>
</TextButton>
/chat
</h2>
<details open>
Expand Down Expand Up @@ -220,23 +219,23 @@ export default function Chat() {
<InviteUserToMatrixRoom
roomId={roomId}
trigger={
<Button
<TextButton
variant="ghost"
title={t('Invite users to {{name}}', { name: matrix.rooms.get(roomId).name })}
>
<Icon>
<RiUserAddLine />
</Icon>
</Button>
</TextButton>
}
/>
<CopyToClipboard title={t('Copy chat link to clipboard')} content={'chat/' + roomId} />
<Button variant="ghost" title={t('Leave chat')} onClick={leaveRoom}>
<TextButton variant="ghost" title={t('Leave chat')} onClick={leaveRoom}>
<Icon>
<RiDoorOpenLine />
</Icon>
</Button>
<Button
</TextButton>
<TextButton
variant="ghost"
title={t('call')}
onClick={() =>
Expand All @@ -248,8 +247,8 @@ export default function Chat() {
<Icon>
<RiPhoneLine />
</Icon>
</Button>
<Button
</TextButton>
<TextButton
variant="ghost"
title={t('Threads')}
onClick={() =>
Expand All @@ -261,7 +260,7 @@ export default function Chat() {
<Icon>
<RiSidebarFoldLine />
</Icon>
</Button>
</TextButton>
</>
)}
</DefaultLayout.IframeHeaderButtonWrapper>
Expand Down

0 comments on commit 11098e3

Please sign in to comment.