瀏覽代碼

Add prisma logo

Tatiana Inama 4 年之前
父節點
當前提交
08be147b57
共有 6 個文件被更改,包括 15 次插入3 次删除
  1. 2 1
      .eslintrc.json
  2. 2 1
      components/Layout.tsx
  3. 8 1
      pages/index.tsx
  4. 二進制
      public/favicon.png
  5. 2 0
      public/favicon.svg
  6. 1 0
      public/prisma.svg

+ 2 - 1
.eslintrc.json

@@ -21,6 +21,7 @@
     "no-console": "off",
     "strict": ["error", "global"],
     "curly": "warn",
-    "@typescript-eslint/no-empty-function": "off"
+    "@typescript-eslint/no-empty-function": "off",
+    "@next/next/no-img-element": "off"
   }
 }

+ 2 - 1
components/Layout.tsx

@@ -7,7 +7,8 @@ const Layout: FC = ({ children }) => (
     <Head>
       <title>Prisma Home Challenge</title>
       <meta name="description" content="My take on Prisma's Home Challenge" />
-      <link rel="icon" href="/favicon.ico" />
+      <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
+      <link rel="icon" type="image/png" href="/favicon.png" />
     </Head>
     <Nav />
     <main className="mx-auto w-full max-w-screen-lg px-4 mt-24">

+ 8 - 1
pages/index.tsx

@@ -14,7 +14,14 @@ const AuthenticatedView: FC<
     <h1 className="text-2xl font-bold mb-4 text-center">Welcome back!</h1>
     <div className="rounded w-full mx-auto border p-4 flex flex-col gap-4 xs:max-w-md xs:gap-6 xs:py-6">
       <header className="flex flex-col items-center text-center gap-2 xs:flex-row xs:gap-4 xs:text-left">
-        <div className="h-12 w-12 bg-gray-300 rounded-full"></div>
+        <div className="h-12 w-12 bg-gray-300 rounded-full flex justify-center items-center">
+          <img
+            src="/favicon.svg"
+            width={25}
+            height={30}
+            alt="profile picture"
+          />
+        </div>
         <div>
           <h2 className="font-bold">{user.name}</h2>
           <p className="text-sm">{user.email}</p>

二進制
public/favicon.png


文件差異過大導致無法顯示
+ 2 - 0
public/favicon.svg


文件差異過大導致無法顯示
+ 1 - 0
public/prisma.svg