Skip to content

Commit

Permalink
update imports/exports
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-Y-Ko committed Sep 7, 2023
1 parent 38de395 commit e3ff820
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
3 changes: 1 addition & 2 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import "./globals.css";
import type { Metadata } from "next";
import { Inter } from "next/font/google";
import { StoreProvider } from "@/components";
import Navbar from "@/components/navbar/Navbar";
import { StoreProvider, Navbar } from "@/components";

export const metadata: Metadata = {
title: "Create Next App",
Expand Down
15 changes: 7 additions & 8 deletions src/components/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,17 @@ import Image from "next/image";
interface AvatarProps {
imgPath?: string;
width?: number;
height?: number
height?: number;
}

export default function Avatar({ imgPath = "/grey_ball.png", width = 24, height = 24 }: AvatarProps) {
export default function Avatar({
imgPath = "/grey_ball.png",
width = 24,
height = 24,
}: AvatarProps) {
return (
<div className="px-0 pointer-events-none">
<Image
width={width}
height={height}
src={imgPath}
alt="Profile image"
/>
<Image width={width} height={height} src={imgPath} alt="Profile image" />
</div>
);
}
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as StoreProvider } from "./StoreProvider";
export { default as Avatar } from "./Avatar";
export { default as EditButton } from "./EditButton";
export { default as Navbar } from "./navbar/Navbar";
2 changes: 1 addition & 1 deletion src/components/navbar/ChinguMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function ChinguMenu() {
alt="Chingu Logo"
priority={false}
/>
<h2 className="text-white font-semibold text-lg">Chingu</h2>
<h2 className=" font-semibold text-lg">Chingu</h2>
</div>
);
}
6 changes: 2 additions & 4 deletions src/components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import { Avatar } from "..";
import Bell from "./Bell";
import ChinguMenu from "./ChinguMenu";
import DropDown from "./DropDown";
import { Avatar } from "@/components";
import { Bell, ChinguMenu, DropDown } from "@/components/navbar";

const name = "Yorick";
const notificationCount = 4;
Expand Down
4 changes: 4 additions & 0 deletions src/components/navbar/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export { default as Bell } from "./Bell";
export { default as ChinguMenu } from "./ChinguMenu";
export { default as DropDown } from "./DropDown";
export { default as DropDownLink } from "./DropDownLink";

0 comments on commit e3ff820

Please sign in to comment.