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

Refactor: insight and list headers #2239

Open
1 of 2 tasks
a0m0rajab opened this issue Nov 30, 2023 · 1 comment
Open
1 of 2 tasks

Refactor: insight and list headers #2239

a0m0rajab opened this issue Nov 30, 2023 · 1 comment

Comments

@a0m0rajab
Copy link
Contributor

Type of feature

πŸ§‘β€πŸ’» Refactor

Current behavior

If you check the code for insight and list header, you could find a some similarities like the one provided:

<div className="relative flex flex-row justify-between w-full">
<div className="flex flex-col md:flex-row ">
<div className="header-image mr-2 p-2 min-w-[130px]">
<ContextThumbnail size={120} ContextThumbnailURL={""}></ContextThumbnail>
</div>
<div className="flex flex-col justify-center p-2 header-info grow">
<div className="flex gap-2">
<Title level={1} className="!text-2xl font-semibold text-slate-900">
{(name && truncateString(name, 30)) || "List"}
</Title>
{<Badge isPublic={isPublic} />}
</div>

return (
<div className="relative flex flex-row justify-between w-full">
<div className="flex flex-col md:flex-row ">
<div className="header-image mr-2 p-2 min-w-[130px]">
<ContextThumbnail size={120} ContextThumbnailURL={""}></ContextThumbnail>
</div>
<div className="flex flex-col justify-center p-2 header-info grow">
<div className="flex gap-2">
<Title level={1} className="!text-2xl font-semibold text-slate-900">
{(insight && truncateString(insight.name, 30)) || "Insights"}
</Title>
{insight && <Badge isPublic={insight?.is_public} />}
</div>
<div className="flex items-center gap-2 mt-4">

I thought it would worth to mention it to see if it's worthy to refactor that code.

Suggested solution

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
Copy link
Contributor

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.

For full info on how to contribute, please check out our contributors guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant