matt HOFFNER commited on
Commit
c0c5f59
·
1 Parent(s): 88ab17b

genai logo

Browse files
public/image.png ADDED
public/logo1.png ADDED
public/logo2.png ADDED
public/logo3.png ADDED
src/app/head.jsx CHANGED
@@ -1,9 +1,9 @@
1
  export default function Head() {
2
  return (
3
  <>
4
- <title>Google Clone Next js 13</title>
5
  <meta content="width=device-width, initial-scale=1" name="viewport" />
6
- <meta name="description" content="Google clone created by Next js 13" />
7
  <link rel="icon" href="/favicon.svg" />
8
  </>
9
  )
 
1
  export default function Head() {
2
  return (
3
  <>
4
+ <title>My Search UI</title>
5
  <meta content="width=device-width, initial-scale=1" name="viewport" />
6
+ <meta name="description" content="Search UI" />
7
  <link rel="icon" href="/favicon.svg" />
8
  </>
9
  )
src/app/page.jsx CHANGED
@@ -1,5 +1,6 @@
1
  import HomeHeader from "@/components/HomeHeader";
2
  import HomeSearch from "@/components/HomeSearch";
 
3
  import Image from "next/image";
4
  import "@/app/globals.css";
5
 
@@ -15,7 +16,7 @@ export default function Home() {
15
  <Image
16
  width="300"
17
  height="100"
18
- src="https://upload.wikimedia.org/wikinews/en/archive/0/0c/20050620003808%21Google_logo_png.png"
19
  />
20
 
21
  <HomeSearch/>
 
1
  import HomeHeader from "@/components/HomeHeader";
2
  import HomeSearch from "@/components/HomeSearch";
3
+ import { logo } from "@/util";
4
  import Image from "next/image";
5
  import "@/app/globals.css";
6
 
 
16
  <Image
17
  width="300"
18
  height="100"
19
+ src={`/logo${logo()}.png`}
20
  />
21
 
22
  <HomeSearch/>
src/app/search/web/page.jsx CHANGED
@@ -4,7 +4,6 @@ import { MemoizedReactMarkdown } from '../../../components/MemoizedReactMarkdown
4
  import { CodeBlock } from '../../../components/CodeBlock';
5
  import { useSearchParams } from 'next/navigation'
6
 
7
-
8
  export default function WebSearchPage() {
9
  const searchParams = useSearchParams()
10
 
 
4
  import { CodeBlock } from '../../../components/CodeBlock';
5
  import { useSearchParams } from 'next/navigation'
6
 
 
7
  export default function WebSearchPage() {
8
  const searchParams = useSearchParams()
9
 
src/components/HomeSearch.jsx CHANGED
@@ -41,7 +41,7 @@ export default function HomeSearch() {
41
 
42
  <div className="flex flex-col space-y-2 sm:space-y-0 sm:space-x-4 justify-center sm:flex-row mt-8 ">
43
  <button onClick={handleSubmit} className="btn">
44
- Google Search
45
  </button>
46
  <button
47
  disabled={randomSearchLoading}
 
41
 
42
  <div className="flex flex-col space-y-2 sm:space-y-0 sm:space-x-4 justify-center sm:flex-row mt-8 ">
43
  <button onClick={handleSubmit} className="btn">
44
+ Search
45
  </button>
46
  <button
47
  disabled={randomSearchLoading}
src/components/SearchHeader.jsx CHANGED
@@ -1,12 +1,24 @@
 
1
  import Image from "next/image";
2
  import SearchBox from "./SearchBox";
 
3
  import SearchHeaderOptions from "./SearchHeaderOptions";
4
 
 
5
  export default function SearchHeader() {
6
  return (
7
  <header className="sticky top-0 bg-white">
8
  <div className="flex w-full p-6 items-center justify-between">
9
- <SearchBox />
 
 
 
 
 
 
 
 
 
10
  </div>
11
  <SearchHeaderOptions />
12
  </header>
 
1
+ import Link from "next/link";
2
  import Image from "next/image";
3
  import SearchBox from "./SearchBox";
4
+ import { logo } from "@/util";
5
  import SearchHeaderOptions from "./SearchHeaderOptions";
6
 
7
+
8
  export default function SearchHeader() {
9
  return (
10
  <header className="sticky top-0 bg-white">
11
  <div className="flex w-full p-6 items-center justify-between">
12
+ <Link href={"/"}>
13
+ <Image
14
+ width="120"
15
+ height="40"
16
+ src={`/logo${logo()}.png`}
17
+ />
18
+ </Link>
19
+ <div className="flex-1">
20
+ <SearchBox />
21
+ </div>
22
  </div>
23
  <SearchHeaderOptions />
24
  </header>
src/util.js ADDED
@@ -0,0 +1 @@
 
 
1
+ export const logo = (array = [1, 2, 3]) => array[Math.floor(Math.random() * array.length)];