Fix merge conflicts

This commit is contained in:
Tuan Dang
2023-08-08 22:07:22 +07:00
4 changed files with 12 additions and 11 deletions
@@ -44,18 +44,18 @@ export const Pagination = ({
return ( return (
<div <div
className={twMerge( className={twMerge(
"flex items-center justify-end text-white w-full p-4 bg-mineshaft-700", "flex items-center justify-end text-white w-full py-3 px-4 bg-mineshaft-800",
className className
)} )}
> >
<div className="mr-6 flex items-center space-x-2"> <div className="mr-6 flex items-center space-x-2">
<div className="text-sm"> <div className="text-xs">
{(page - 1) * perPage} - {(page - 1) * perPage + perPage} of {count} {(page - 1) * perPage} - {(page - 1) * perPage + perPage} of {count}
</div> </div>
<DropdownMenu> <DropdownMenu>
<DropdownMenuTrigger asChild> <DropdownMenuTrigger asChild>
<IconButton ariaLabel="per-page-list" variant="plain"> <IconButton ariaLabel="per-page-list" variant="plain">
<FontAwesomeIcon icon={faCaretDown} /> <FontAwesomeIcon className="text-xs" icon={faCaretDown} />
</IconButton> </IconButton>
</DropdownMenuTrigger> </DropdownMenuTrigger>
<DropdownMenuContent className="min-w-fit"> <DropdownMenuContent className="min-w-fit">
@@ -79,7 +79,7 @@ export const Pagination = ({
onClick={() => onChangePage(prevPageNumber)} onClick={() => onChangePage(prevPageNumber)}
isDisabled={!canGoPrev} isDisabled={!canGoPrev}
> >
<FontAwesomeIcon icon={faChevronLeft} /> <FontAwesomeIcon className="text-xs" icon={faChevronLeft} />
</IconButton> </IconButton>
<IconButton <IconButton
variant="plain" variant="plain"
@@ -87,7 +87,7 @@ export const Pagination = ({
onClick={() => onChangePage(nextPageNumber)} onClick={() => onChangePage(nextPageNumber)}
isDisabled={!canGoNext} isDisabled={!canGoNext}
> >
<FontAwesomeIcon icon={faChevronRight} /> <FontAwesomeIcon className="text-xs" icon={faChevronRight} />
</IconButton> </IconButton>
</div> </div>
</div> </div>
+1 -1
View File
@@ -40,7 +40,7 @@ export const Select = forwardRef<HTMLButtonElement, SelectProps>(
ref={ref} ref={ref}
className={twMerge( className={twMerge(
`inline-flex items-center justify-between rounded-md `inline-flex items-center justify-between rounded-md
bg-mineshaft-900 px-3 py-2 font-inter text-sm font-normal text-bunker-200 outline-none data-[placeholder]:text-gray-500`, bg-mineshaft-900 px-3 py-2 font-inter text-sm font-normal text-bunker-200 outline-none data-[placeholder]:text-mineshaft-200`,
className className
)} )}
> >
@@ -8,7 +8,8 @@ import {
DatePicker, DatePicker,
FormControl, FormControl,
Select, Select,
SelectItem} from "@app/components/v2"; SelectItem
} from "@app/components/v2";
import { useWorkspace } from "@app/context"; import { useWorkspace } from "@app/context";
import { useGetAuditLogActorFilterOpts } from "@app/hooks/api"; import { useGetAuditLogActorFilterOpts } from "@app/hooks/api";
import { eventToNameMap, userAgentTTypeoNameMap } from "@app/hooks/api/auditLogs/constants"; import { eventToNameMap, userAgentTTypeoNameMap } from "@app/hooks/api/auditLogs/constants";
@@ -77,7 +78,7 @@ export const LogsFilter = ({
// {...(field.value ? { value: field.value } : { placeholder: "Select" })} // {...(field.value ? { value: field.value } : { placeholder: "Select" })}
{...field} {...field}
onValueChange={(e) => onChange(e)} onValueChange={(e) => onChange(e)}
className="w-full" className="w-full bg-mineshaft-700 border border-mineshaft-500 text-mineshaft-100"
> >
{eventTypes.map(({ label, value }) => ( {eventTypes.map(({ label, value }) => (
<SelectItem value={String(value || "")} key={label}> <SelectItem value={String(value || "")} key={label}>
@@ -103,7 +104,7 @@ export const LogsFilter = ({
{...(field.value ? { value: field.value } : { placeholder: "Select" })} {...(field.value ? { value: field.value } : { placeholder: "Select" })}
{...field} {...field}
onValueChange={(e) => onChange(e)} onValueChange={(e) => onChange(e)}
className="w-full" className="w-full bg-mineshaft-700 border border-mineshaft-500 text-mineshaft-100"
> >
{data.map((actor) => renderActorSelectItem(actor))} {data.map((actor) => renderActorSelectItem(actor))}
</Select> </Select>
@@ -125,7 +126,7 @@ export const LogsFilter = ({
{...(field.value ? { value: field.value } : { placeholder: "Select" })} {...(field.value ? { value: field.value } : { placeholder: "Select" })}
{...field} {...field}
onValueChange={(e) => onChange(e)} onValueChange={(e) => onChange(e)}
className="w-full" className="w-full bg-mineshaft-700 border border-mineshaft-500 text-mineshaft-100"
> >
{userAgentTypes.map(({ label, value }) => ( {userAgentTypes.map(({ label, value }) => (
<SelectItem value={String(value || "")} key={label}> <SelectItem value={String(value || "")} key={label}>
@@ -305,7 +305,7 @@ export const LogsTableRow = ({
} }
return ( return (
<Tr className={`log-${auditLog._id} h-10`}> <Tr className={`log-${auditLog._id} h-10 border-b border-x-0 border-t-0`}>
<Td>{formatDate(auditLog.createdAt)}</Td> <Td>{formatDate(auditLog.createdAt)}</Td>
<Td>{`${eventToNameMap[auditLog.event.type]}`}</Td> <Td>{`${eventToNameMap[auditLog.event.type]}`}</Td>
{renderActor(auditLog.actor)} {renderActor(auditLog.actor)}