Skip to content

Commit

Permalink
Merge pull request #572 from subquery/feat/resize-info-edit
Browse files Browse the repository at this point in the history
feat: resize for markdown editor
  • Loading branch information
HuberTRoy authored Nov 29, 2024
2 parents b708d9b + 2162ef0 commit e907e87
Showing 1 changed file with 19 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import React, { FC, useEffect } from 'react';
import { Markdown, Spinner, Typography } from '@subql/components';
import { Button } from 'antd';
import styled from 'styled-components';

import { useCoordinatorIndexer } from 'containers/coordinatorIndexer';
import { useNotification } from 'containers/notificationContext';
Expand All @@ -13,6 +14,16 @@ import { AccountAction } from 'pages/project-details/types';
import { parseError } from 'utils/error';
import { createIndexerMetadata } from 'utils/ipfs';

const MarkdownStyled = styled.div`
.subql-markdown__main {
min-height: 160px;
.ant-input {
height: 160px;
resize: vertical;
}
}
`;

const NodeOperatorInformation: FC = () => {
const { indexer: account } = useCoordinatorIndexer();
const { loading, metadata: indexerMetadata, fetchMetadata } = useIndexerMetadata(account || '');
Expand Down Expand Up @@ -78,12 +89,14 @@ const NodeOperatorInformation: FC = () => {
community.
</Typography>

<Markdown
value={markdownVal}
onChange={(val) => {
setMarkdownVal(val || '');
}}
/>
<MarkdownStyled>
<Markdown
value={markdownVal}
onChange={(val) => {
setMarkdownVal(val || '');
}}
/>
</MarkdownStyled>
{markdownVal !== indexerMetadata?.description ? (
<div>
<Button
Expand Down

0 comments on commit e907e87

Please sign in to comment.