Skip to content

Commit

Permalink
Merge branch 'main' into dev-change-notfound-page
Browse files Browse the repository at this point in the history
  • Loading branch information
paur94 committed Sep 6, 2024
2 parents 3cd8d84 + f463e51 commit 9cc56fb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/[searchParam]/SearchData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default function SearchData({ searchParam }: { searchParam: string }) {
const basePath = process.env.NEXT_PUBLIC_APP_BASE_PATH

const apiClient = new LayerSwapApiClient()

const { data, error, isLoading } = useSWR<ApiResponse<SwapData[]>>(`/explorer/${searchParam}?version=${process.env.NEXT_PUBLIC_API_VERSION}`, apiClient.fetcher, { dedupingInterval: 60000 });

const swap = data?.data?.[0]?.swap
Expand Down
3 changes: 2 additions & 1 deletion app/[searchParam]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ import SearchData from "./SearchData";

export default async function Page({ params }: { params: { searchParam: string } }) {

console.log(params.searchParam)
return (
<main className="w-full py-5 px-6 xl:px-0">
<SearchData searchParam={params.searchParam} />
<SearchData searchParam={decodeURIComponent(params.searchParam)} />
</main>
)
}
2 changes: 1 addition & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const Footer = () => {
</div>
<div className="mt-3 order-1 md:mt-0 place-self-start">
<p className="text-center text-xs text-primary-text-muted leading-6">
&copy; {new Date().getFullYear()} Bransfer, Inc. All rights reserved.
&copy; {new Date().getFullYear()} Layerswap Labs, Inc. All rights reserved.
</p>
</div>
</footer>
Expand Down
2 changes: 1 addition & 1 deletion components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Search = () => {

const handleSearch = () => {
const url = getLastPart(searchParam)
router.push(`/${url}`)
router.push(`/${encodeURIComponent(String(url))}`)
}

const clearSearch = () => {
Expand Down
6 changes: 3 additions & 3 deletions components/notFound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export default function NotFound() {
<div className="flex flex-col items-center justify-center text-center p-4 relative z-20">
<h1 className="text-2xl font-semibold text-white md:text-4xl">We couldn&apos;t find anything</h1>
<p className="text-base text-primary-text-placeholder mt-2">Please make sure you entered a valid address/source Tx/destination TX.</p>
<span className="text-base text-primary-text-placeholder block">if the issue persists, you can contact our support.</span>
<span className="text-base text-primary-text-placeholder block">If the issue persists, you can contact our support.</span>
<div className="flex items-center mt-6 gap-x-3">
<Link href="/" className="w-full px-5 py-2 text-sm tracking-wide text-primary-text transition-colors duration-200 bg-secondary-600 rounded-lg shrink-0 sm:w-auto hover:bg-secondary-700/80">
Clear search
</Link>
</div>
</div>
</section>
)
}
);
}

0 comments on commit 9cc56fb

Please sign in to comment.