-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search: UI search page, handle search results with keyword
- Loading branch information
Showing
18 changed files
with
339 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import axios from "axios"; | ||
|
||
export default axios.create({ | ||
baseURL: "https://proxy-nct.vercel.app", | ||
baseURL: "http://localhost:3001", | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import client from "./client"; | ||
|
||
export const getTopKeyword = async () => { | ||
const res = await client.get("top-keyword"); | ||
return res.data; | ||
}; | ||
|
||
export const searchKeyword = async (keyword: string) => { | ||
const res = await client.get("search", { | ||
params: { | ||
keyword, | ||
}, | ||
}); | ||
|
||
return res.data; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React, { FC } from "react"; | ||
import { Link } from "react-router-dom"; | ||
|
||
interface TrendingItemProps { | ||
position: string; | ||
name: string; | ||
} | ||
|
||
const TrendingItem: FC<TrendingItemProps> = ({ position, name }) => { | ||
return ( | ||
<Link | ||
to={`/results?q=${name}`} | ||
className="bg-gray-200 py-1 px-2 flex items-center rounded-sm cursor-pointer" | ||
> | ||
<span className="text-blue-500 font-semibold">#{position}</span> | ||
|
||
<p className="text-gray-400 text-sm font-normal ml-1">{name}</p> | ||
</Link> | ||
); | ||
}; | ||
|
||
export default TrendingItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from "react"; | ||
import ListSongSkeleton from "./ListSongSkeleton"; | ||
import SliderSkeleton from "./SliderSkeleton"; | ||
|
||
const ResultsSkeleton = () => { | ||
return ( | ||
<div> | ||
<h1 className="mb-5 font-semibold text-2xl h-8 skeleton"></h1> | ||
|
||
<ListSongSkeleton /> | ||
<SliderSkeleton /> | ||
<SliderSkeleton /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ResultsSkeleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import React from "react"; | ||
|
||
const SearchSkeleton = () => { | ||
return ( | ||
<> | ||
<div className="mt-5"> | ||
<h1 className="mb-5 font-semibold text-xl skeleton h-6"></h1> | ||
<div className="flex items-center flex-wrap gap-2"> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
</div> | ||
</div> | ||
|
||
<div className="mt-5"> | ||
<h1 className="mb-5 font-semibold text-xl skeleton h-6"></h1> | ||
<div className="flex items-center flex-wrap gap-2"> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
<div className="w-[100px] py-4 skeleton"></div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default SearchSkeleton; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
821d733
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nct-clone – ./
nct-clone-git-master-an678-mhg.vercel.app
nct-clone-an678-mhg.vercel.app
nct-clone.vercel.app