Skip to content

Commit

Permalink
refactor(front): move tables to views subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
Lerri-Cofannos committed Oct 6, 2023
1 parent 303f6f2 commit 461452f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion front/src/app/logs/[id]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LogDetailsTable } from "@/features/tables/LogDetailsTable";
import { LogDetailsTable } from "@/features/tables/views/LogDetailsTable";
import { LogsData } from "@/services/LogsData";

export default async function LogDetails({
Expand Down
2 changes: 1 addition & 1 deletion front/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FilterHeader } from "@/features/filter/FilterHeader";
import { TableBody } from "@/features/tables/TableBody";
import { TableBody } from "@/features/tables/views/TableBody";
import { LogsData } from "@/services/LogsData";

export const revalidate = 0;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from "@/components/atoms/Button";
import { CardAtom } from "@/components/atoms/CardAtom";
import { useNavigation } from "@/hooks/useNavigation";
import { LogData } from "@/types/logDisplayOptions";
import { ColumnContentTags } from "./components/ColumnContentTags";
import { ColumnContentTags } from "../components/ColumnContentTags";

export const LogDetailsTable = ({ logDetails }: { logDetails: LogData }) => {
const cost_text: string =
Expand Down Expand Up @@ -55,7 +55,10 @@ export const LogDetailsTable = ({ logDetails }: { logDetails: LogData }) => {
</tr>
<tr>
<td className="font-bold px-4 py-2">Tags</td>
<ColumnContentTags tags={logDetails.tags} />
<ColumnContentTags
tags={logDetails.tags}
logId={logDetails.id}
/>
</tr>
</tbody>
</table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { CardAtom } from "@/components/atoms/CardAtom";
import { ColumnHeader } from "@/features/tables/components/ColumnHeader";
import { useNavigation } from "@/hooks/useNavigation";
import { LogDataArray } from "@/types/logDisplayOptions";
import { ColumnContent } from "./components/ColumnContent";
import { ColumnContentTags } from "./components/ColumnContentTags";
import { formatCostToString } from "./helpers/formatCost";
import { ColumnContent } from "../components/ColumnContent";
import { ColumnContentTags } from "../components/ColumnContentTags";
import { formatCostToString } from "../helpers/formatCost";

export default function LogsTable({ logs }: { logs: LogDataArray }) {
const { router } = useNavigation();
Expand Down Expand Up @@ -61,7 +61,7 @@ export default function LogsTable({ logs }: { logs: LogDataArray }) {
"undefined: an error occurred"
}
/>
<ColumnContentTags tags={log.tags} />
<ColumnContentTags tags={log.tags} logId={log.id} />
</tr>
))}
</tbody>
Expand Down
File renamed without changes.

0 comments on commit 461452f

Please sign in to comment.