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

Profile: rewrite hosting and meet panel in React #2172

Merged
merged 1 commit into from
Mar 14, 2021
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
48 changes: 48 additions & 0 deletions modules/users/client/components/HostingAndMeetPanel.component.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// External dependencies
import { useTranslation } from 'react-i18next';
import React from 'react';
import styled from 'styled-components';

// Internal dependencies
import '@/config/client/i18n';
import Icon from '@/modules/core/client/components/Icon';

const SofaIcon = styled(Icon)`
margin-right: 15px;
`;

export default function HostingAndMeetPanel() {
const { t } = useTranslation('users');

return (
<div className="panel panel-default">
<div className="panel-heading">{t('Hosting & meet')}</div>
<div className="panel-body">
<div className="form-horizontal">
<p>
<a
role="button"
href="/offer/host"
className="btn btn-inverse-primary"
>
<SofaIcon icon="sofa" />
{t('Modify your hosting location')}
</a>
</p>
<p>
<a
role="button"
href="/offer/meet"
className="btn btn-inverse-primary"
>
<Icon icon="users" />
{t('Modify your meet locations')}
</a>
</p>
</div>
</div>
</div>
);
}

HostingAndMeetPanel.propTypes = {};
Original file line number Diff line number Diff line change
Expand Up @@ -64,30 +64,4 @@
</p>
</form>

<div class="panel panel-default">
<div class="panel-heading">Hosting & meet</div>
<div class="panel-body">
<div class="form-horizontal">
<p>
<a
role="button"
ui-sref="offer.host.edit"
class="btn btn-inverse-primary"
>
<i class="icon-sofa"></i>
&nbsp;&nbsp;&nbsp; Modify your hosting location
</a>
</p>
<p>
<a
role="button"
ui-sref="offer.meet.list"
class="btn btn-inverse-primary"
>
<i class="icon-users"></i>
Modify your meet locations
</a>
</p>
</div>
</div>
</div>
<hosting-and-meet-panel></hosting-and-meet-panel>