Fix some broken social icons in frontend and admin

This commit is contained in:
Gabe Kangas
2022-10-18 23:35:36 -07:00
parent 751e3dec55
commit de90e6a74c
34 changed files with 9 additions and 35 deletions

View File

@@ -3,7 +3,7 @@ import { Typography, Table, Button, Modal, Input } from 'antd';
import { ColumnsType } from 'antd/lib/table';
import { CaretDownOutlined, CaretUpOutlined, DeleteOutlined } from '@ant-design/icons';
import { SocialDropdown } from './SocialDropdown';
import { fetchData, SOCIAL_PLATFORMS_LIST, NEXT_PUBLIC_API_HOST } from '../../utils/apis';
import { fetchData, SOCIAL_PLATFORMS_LIST } from '../../utils/apis';
import { ServerStatusContext } from '../../utils/server-status-context';
import {
API_SOCIAL_HANDLES,
@@ -212,12 +212,10 @@ export const EditSocialLinks: FC = () => {
);
}
const { icon, platform: platformName } = platformInfo;
const iconUrl = `${NEXT_PUBLIC_API_HOST}${icon.slice(1)}`;
return (
<div className="social-handle-cell">
<span className="option-icon">
<img src={iconUrl} alt="" className="option-icon" />
<img src={icon} alt="" className="option-icon" />
</span>
<p className="option-label">
<strong>{platformName}</strong>

View File

@@ -1,7 +1,6 @@
import React, { FC } from 'react';
import { Select } from 'antd';
import { SocialHandleDropdownItem } from '../../types/config-section';
import { NEXT_PUBLIC_API_HOST } from '../../utils/apis';
import { OTHER_SOCIAL_HANDLE_OPTION } from '../../utils/config-constants';
export type DropdownProps = {
@@ -39,12 +38,11 @@ export const SocialDropdown: FC<DropdownProps> = ({ iconList, selectedOption, on
>
{iconList.map(item => {
const { platform, icon, key } = item;
const iconUrl = `${NEXT_PUBLIC_API_HOST}${icon.slice(1)}`;
return (
<Select.Option className="social-option" key={`platform-${key}`} value={key}>
<span className="option-icon">
<img src={iconUrl} alt="" className="option-icon" />
<img src={icon} alt="" className="option-icon" />
</span>
<span className="option-label">{platform}</span>
</Select.Option>