Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adityachoudhari26 committed Oct 22, 2024
1 parent 4c7d63f commit b93b4e0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 19 deletions.
4 changes: 2 additions & 2 deletions apps/webservice/src/app/[workspaceSlug]/(job)/jobs/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export default async function JobsPage({
<TableBody>
{releaseJobTriggers.map((job) => (
<TableRow key={job.id}>
<TableCell>{job.environment?.name ?? "N/A"}</TableCell>
<TableCell>{job.target?.name ?? "N/A"}</TableCell>
<TableCell>{job.environment.name}</TableCell>
<TableCell>{job.target.name}</TableCell>
<TableCell>{job.release.version}</TableCell>
<TableCell>{job.type}</TableCell>
<TableCell>{format(new Date(job.createdAt), "PPpp")}</TableCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DeploymentsTable: React.FC<{ targetId: string }> = ({ targetId }) => {
j.job.status === JobStatus.Completed ||
j.job.status === JobStatus.Pending,
)
.find((j) => j.deployment?.id === deployment.id);
.find((j) => j.deployment.id === deployment.id);

return (
<TableRow key={deployment.id}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const Release: React.FC<{
const latestJobsByTarget = _.chain(releaseJobTriggers)
.groupBy((r) => r.target.id)
.mapValues((triggers) =>
_.maxBy(triggers, (t) => new Date(t.job.createdAt ?? 0)),
_.maxBy(triggers, (t) => new Date(t.job.createdAt)),
)
.values()
.compact()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,7 @@ const ReleaseCell: React.FC<{
isPresent(releaseJobTrigger.releaseId) &&
isPresent(releaseJobTrigger.targetId),
)
.map((releaseJobTrigger) => ({
...releaseJobTrigger,
environmentId: releaseJobTrigger.environmentId,
target: releaseJobTrigger.target!,
releaseId: releaseJobTrigger.releaseId,
deployment: releaseJobTrigger.release.deployment!,
}));
.map((releaseJobTrigger) => ({ ...releaseJobTrigger }));
return (
<>
{hasRelease && hasTargets && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,7 @@ export const DeploymentPageContent: React.FC<DeploymentPageContentProps> = ({
isPresent(releaseJobTrigger.releaseId) &&
isPresent(releaseJobTrigger.targetId),
)
.map((releaseJobTrigger) => ({
...releaseJobTrigger,
environmentId: releaseJobTrigger.environmentId,
target: releaseJobTrigger.target!,
releaseId: releaseJobTrigger.releaseId,
}));
.map((releaseJobTrigger) => ({ ...releaseJobTrigger }));

const distribution = api.deployment.distributionById.useQuery(deployment.id, {
refetchInterval: 2_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const JobsTable: React.FC<{ releaseId: string }> = ({ releaseId }) => {
<TableBody>
{releaseJobTriggers.data?.map((job) => (
<TableRow key={job.id} className={cn("border-b-neutral-800/50")}>
<TableCell>{job.environment?.name}</TableCell>
<TableCell>{job.target?.name}</TableCell>
<TableCell>{job.environment.name}</TableCell>
<TableCell>{job.target.name}</TableCell>
<TableCell>{job.job.status}</TableCell>
<TableCell>{job.type}</TableCell>
</TableRow>
Expand Down

0 comments on commit b93b4e0

Please sign in to comment.