Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Converting omnichannel installation files to ts #25665

Merged
merged 1 commit into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Box } from '@rocket.chat/fuselage';
import { useSetting, useTranslation } from '@rocket.chat/ui-contexts';
import React from 'react';
import React, { ReactElement } from 'react';

import Page from '../../../components/Page';
import RawText from '../../../components/RawText';
import TextCopy from '../../../components/TextCopy';
import Wrapper from './Wrapper';

const Installation = () => {
const Installation = (): ReactElement => {
const t = useTranslation();

const siteUrl = useSetting('Site_Url')?.replace(/\/$/, '');
const setting = useSetting('Site_Url') as string;
const siteUrl = setting?.replace(/\/$/, '');

const installString = `<!-- Start of Rocket.Chat Livechat Script -->
<script type="text/javascript">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box } from '@rocket.chat/fuselage';
import React from 'react';
import React, { ReactElement } from 'react';

const Wrapper = (text) => (
const Wrapper = (text: string): ReactElement => (
<Box fontFamily='mono' alignSelf='center' fontScale='p2' style={{ wordBreak: 'break-all' }} mie='x4' flexGrow={1} withRichContent>
<pre>
<code>{text}</code>
Expand Down