Skip to content

Commit

Permalink
refac: made use of path alias for components
Browse files Browse the repository at this point in the history
  • Loading branch information
Oshioke-Salaki committed May 24, 2024
1 parent 697bd43 commit 0643b6e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion frontend/src/app/burner/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"use client";
import Burners from "../components/Burner/Burner";
import Burners from "~/Burner/Burner";

export default function Page() {
return (
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import "./globals.css";
import { StarknetProvider } from "./components/StarknetProvider";
import {Toaster} from "react-hot-toast"
import { StarknetProvider } from "~/StarknetProvider";
import { Toaster } from "react-hot-toast";

const inter = Inter({ subsets: ["latin"] });

Expand All @@ -22,7 +22,7 @@ export default function RootLayout({
className={`${inter.className} dark:bg-black bg-gray-300 dark:text-white transition-all duration-500 ease-in-out`}
>
<StarknetProvider>{children}</StarknetProvider>
<Toaster/>
<Toaster />
</body>
</html>
);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Image from "next/image";
import Header from "./components/Header";
import Header from "~/Header";

export default function Home() {
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/scaffold-deployer/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ScaffoldDeployer from "../components/ScaffoldDeployer/ScaffoldDeployer";
import ScaffoldDeployer from "~/ScaffoldDeployer/ScaffoldDeployer";

export default async function Page() {
return (
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/wikipedia/columns.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { ColumnDef } from "@tanstack/react-table";
import { Button } from "@/app/components/ui/button";
import { Button } from "~/ui/button";
import { ArrowUpDown, MoreHorizontal } from "lucide-react";
import Link from "next/link";

Expand Down
10 changes: 5 additions & 5 deletions frontend/src/app/wikipedia/data-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
TableRow,
} from "@/app/components/ui/table";

import { Button } from "@/app/components/ui/button";
import { Input } from "@/app/components/ui/input";
import { Button } from "~/ui/button";
import { Input } from "~/ui/input";
import React from "react";

interface DataTableProps<TData, TValue> {
Expand All @@ -36,7 +36,7 @@ export function DataTable<TData, TValue>({
}: DataTableProps<TData, TValue>) {
const [sorting, setSorting] = React.useState<SortingState>([]);
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>(
[]
[],
);

const table = useReactTable({
Expand Down Expand Up @@ -78,7 +78,7 @@ export function DataTable<TData, TValue>({
? null
: flexRender(
header.column.columnDef.header,
header.getContext()
header.getContext(),
)}
</TableHead>
);
Expand All @@ -97,7 +97,7 @@ export function DataTable<TData, TValue>({
<TableCell key={cell.id}>
{flexRender(
cell.column.columnDef.cell,
cell.getContext()
cell.getContext(),
)}
</TableCell>
))}
Expand Down
4 changes: 3 additions & 1 deletion frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@
"name": "next"
}
],
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
"@/*": ["./src/*"],
"~/*": ["./src/app/components/*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
Expand Down

0 comments on commit 0643b6e

Please sign in to comment.