Skip to content

Commit

Permalink
Minor ui improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulyadav-57 committed Aug 9, 2023
1 parent 767a36a commit 0719139
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
font-size: 1rem;
padding: 0.5rem 0;
cursor: pointer;
gap: 4px;
> div {
width: 100%;
}
Expand Down
8 changes: 5 additions & 3 deletions src/components/project/NewProject/NewProject.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const NewProject: FC = () => {
const [isLoading, setIsLoading] = useState(false);

const router = useRouter();
const { importURL } = router.query;
const { importURL, name: projectName } = router.query;

const [form] = useForm();

Expand Down Expand Up @@ -81,14 +81,16 @@ const NewProject: FC = () => {
form.setFieldsValue({
template: 'import',
importType: 'github',
githubUrl: importURL,
githubUrl: importURL || '',
name: projectName || '',
});
setIsActive(true);
const finalQueryParam = router.query;
delete finalQueryParam.importURL;
delete finalQueryParam.name;
router.replace({ query: finalQueryParam });
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [importURL, form]);
}, [importURL, projectName, form]);

const closeModal = () => {
setIsActive(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ const ContractInteraction: FC<Props> = ({
sandbox="allow-scripts"
/>
<p>
<b>
This will be used to send internal message and call getter method on
contract
</b>
</p>
<br />

Expand Down
13 changes: 10 additions & 3 deletions src/components/workspace/tree/FileTree/ItemActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import AppIcon from '@/components/ui/icon';
import cn from 'clsx';
import React, { FC } from 'react';

import { Tooltip } from 'antd';
import s from './FileTree.module.scss';

type actionsTypes = 'Edit' | 'NewFile' | 'NewFolder' | 'Close';
Expand Down Expand Up @@ -33,18 +34,22 @@ const ItemAction: FC<Props> = ({
const actionList = [
{
title: 'Edit',
label: 'Edit',
action: onRename,
},
{
title: 'NewFile',
label: 'New File',
action: onNewFile,
},
{
title: 'NewFolder',
label: 'New Folder',
action: onNewDirectory,
},
{
title: 'Close',
label: 'Delete',
action: onDelete,
},
];
Expand All @@ -56,9 +61,11 @@ const ItemAction: FC<Props> = ({
return <React.Fragment key={i} />;
}
return (
<span key={i} onClick={(e) => handleOnClick(e, item.action)}>
<AppIcon name={item.title as any} />
</span>
<Tooltip title={item.label} key={i}>
<span onClick={(e) => handleOnClick(e, item.action)}>
<AppIcon name={item.title as any} />
</span>
</Tooltip>
);
})}
</div>
Expand Down
1 change: 1 addition & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export default function App({
theme={{
token: {
colorPrimary: '#007fd4',
fontFamily: 'var(--font-body)',
},
algorithm: darkAlgorithm,
}}
Expand Down

0 comments on commit 0719139

Please sign in to comment.