chore: settings bug fixes and ui improvement (#2198)

* fix: settings bug fixes and ui improvement

* chore: setting sidebar scroll fix & code refactor
This commit is contained in:
Anmol Singh Bhatia 2023-09-15 19:30:53 +05:30 committed by GitHub
parent 3d72279edb
commit 5d331477ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 108 additions and 101 deletions

View file

@ -147,7 +147,9 @@ const IntegrationGuide = () => {
</div>
</div>
) : (
<p className="py-2 text-sm text-custom-text-200">No previous export available.</p>
<p className="text-sm text-custom-text-200 px-4 py-6">
No previous export available.
</p>
)
) : (
<Loader className="mt-6 grid grid-cols-1 gap-3">

View file

@ -129,7 +129,7 @@ const IntegrationGuide = () => {
</button>
</h3>
</div>
<div className="flex flex-col px-4 py-6">
<div className="flex flex-col">
{importerServices ? (
importerServices.length > 0 ? (
<div className="space-y-2">
@ -145,7 +145,7 @@ const IntegrationGuide = () => {
</div>
</div>
) : (
<p className="py-2 text-sm text-custom-text-200">
<p className="text-sm text-custom-text-200 px-4 py-6">
No previous imports available.
</p>
)

View file

@ -8,6 +8,8 @@ import useSWR from "swr";
import projectService from "services/project.service";
// ui
import { Avatar, CustomSearchSelect } from "components/ui";
// icon
import { Ban } from "lucide-react";
// fetch-keys
import { PROJECT_MEMBERS } from "constants/fetch-keys";
@ -49,7 +51,10 @@ export const MemberSelect: React.FC<Props> = ({ value, onChange }) => {
{selectedOption ? (
selectedOption?.display_name
) : (
<span className="text-sm py-0.5 text-custom-sidebar-text-400">Select</span>
<div className="flex items-center gap-2">
<Ban className="h-3.5 w-3.5 text-custom-sidebar-text-400 rotate-90" />
<span className="text-sm py-0.5 text-custom-sidebar-text-400">None</span>
</div>
)}
</div>
}
@ -61,7 +66,12 @@ export const MemberSelect: React.FC<Props> = ({ value, onChange }) => {
{
value: "none",
query: "none",
content: <div className="flex items-center gap-2">None</div>,
content: (
<div className="flex items-center gap-2">
<Ban className="h-3.5 w-3.5 text-custom-sidebar-text-400 rotate-90" />
<span className="text-sm py-0.5 text-custom-sidebar-text-400">None</span>
</div>
),
},
]
}

View file

@ -2,11 +2,7 @@ import React from "react";
import { useRouter } from "next/router";
import Link from "next/link";
type Props = {
profilePage?: boolean;
};
export const SettingsSidebar: React.FC<Props> = ({ profilePage = false }) => {
export const SettingsSidebar = () => {
const router = useRouter();
const { workspaceSlug, projectId } = router.query;