Skip to content

Commit

Permalink
fix(ui): update incorrect text on repositories dropdown (#236)
Browse files Browse the repository at this point in the history
* refactor(ui): comply with the codebase

* fix(ui): fix incorrect text on repositories dropdown
  • Loading branch information
marcantoinegodde authored Feb 5, 2024
1 parent 17f8c95 commit 9486f19
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions ui/src/components/loaders/CardLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface CardLoaderProps {
}

const CardLoader: React.FC<CardLoaderProps> = ({ className, variant }) => {
const style = {
const styles = {
light: `bg-[linear-gradient(270deg,_#D8EBFF_0%,_#ECF5FF_100%)]
shadow-light`,
dark: `bg-[linear-gradient(270deg,_#252525_0%,_rgba(68,_67,_67,_0.24)_100%)]
Expand All @@ -20,7 +20,7 @@ const CardLoader: React.FC<CardLoaderProps> = ({ className, variant }) => {
`h-[275px]
rounded-2xl
animate-pulse
${style[variant]}`,
${styles[variant]}`,
className
)}
></div>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/loaders/TableLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export interface TableLoaderProps {
}

const TableLoader: React.FC<TableLoaderProps> = ({ className, variant }) => {
const style = {
const styles = {
light: `bg-[linear-gradient(270deg,_#D8EBFF_0%,_#ECF5FF_100%)]`,
dark: `bg-[linear-gradient(270deg,_#252525_0%,_rgba(68,_67,_67,_0.24)_100%)]`,
};
Expand All @@ -18,7 +18,7 @@ const TableLoader: React.FC<TableLoaderProps> = ({ className, variant }) => {
`h-4
rounded-full
animate-pulse
${style[variant]}`,
${styles[variant]}`,
className
)}
></div>
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/layers/Layers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import Card from "@/components/cards/Card";
import Table from "@/components/tables/Table";

import StateDropdown from "@/pages/layers/components/StateDropdown";
import RepositoryDropdown from "@/pages/layers/components/RepositoryDropdown";
import RepositoriesDropdown from "@/pages/layers/components/RepositoriesDropdown";

import { LayerState } from "@/clients/layers/types";

Expand Down Expand Up @@ -197,7 +197,7 @@ const Layers: React.FC = () => {
label="Repository"
filled={repositoryFilter.length !== 0}
>
<RepositoryDropdown
<RepositoriesDropdown
variant={theme}
filter={repositoryFilter}
onChange={setRepositoryFilter}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ import Box from "@/components/misc/Box";
import Input from "@/components/inputs/Input";
import Checkbox from "@/components/checkboxes/Checkbox";

export interface RepositoryDropdownProps {
export interface RepositoriesDropdownProps {
variant?: "light" | "dark";
filter: string[];
onChange: (filter: string[]) => void;
}

const RepositoryDropdown: React.FC<RepositoryDropdownProps> = ({
const RepositoriesDropdown: React.FC<RepositoriesDropdownProps> = ({
variant,
filter,
onChange,
Expand Down Expand Up @@ -60,7 +60,7 @@ const RepositoryDropdown: React.FC<RepositoryDropdownProps> = ({
${variant === "light" ? "text-primary-600" : "text-nuances-300"}
`}
>
Repository
Repositories
</span>
<hr
className={`
Expand All @@ -72,7 +72,7 @@ const RepositoryDropdown: React.FC<RepositoryDropdownProps> = ({
<Input
variant={variant}
className="w-[200px] mx-2"
placeholder="Search repository"
placeholder="Search repositories"
value={search}
onChange={handleSearch}
/>
Expand Down Expand Up @@ -118,4 +118,4 @@ const RepositoryDropdown: React.FC<RepositoryDropdownProps> = ({
);
};

export default RepositoryDropdown;
export default RepositoriesDropdown;

0 comments on commit 9486f19

Please sign in to comment.