Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Change item card name from Link to Text #182

Merged
merged 1 commit into from
Jan 6, 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
3 changes: 1 addition & 2 deletions webportal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 5 additions & 9 deletions webportal/src/app/market_list/components/item_card.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
// Licensed under the MIT License.
import PropTypes from 'prop-types';
import React, { useContext } from 'react';
import { Text, Stack, Link } from 'office-ui-fabric-react';
import { FontClassNames } from '@uifabric/styling';
import { Text, Stack, getTheme } from 'office-ui-fabric-react';
import styled from 'styled-components';
import Card from 'App/components/card';
import Context from 'App/context';
import { ReactComponent as DataIcon } from 'App/assets/data.svg';
import { ReactComponent as JobIcon } from 'App/assets/job.svg';
import { TYPE_ENUM } from 'App/utils/constants';

const { palette } = getTheme();

const HoverCard = styled(Card)`
cursor: pointer;
min-width: 400px;
Expand Down Expand Up @@ -48,14 +49,9 @@ const ItemCard = props => {
{item.type === TYPE_ENUM.OLD_TEMPLATE && <JobIcon />}
</Stack.Item>
<Stack gap='m' styles={{ root: [{ width: '70%' }] }}>
<Link
className={FontClassNames.xLarge}
href={`${
window.location.href.split('?type=')[0]
}market_detail?itemId=${item.id}`}
>
<Text style={{ color: palette.themeDark }} variant={'xLarge'}>
{item.name}
</Link>
</Text>
<Text variant={'small'}>
{item.author} published {populateCreatedTime()}
</Text>
Expand Down