Commit cc381104 authored by tom's avatar tom

fix tests

parent 92731b44
......@@ -9,6 +9,7 @@ jobs:
jest_tests:
name: Run tests with Jest
runs-on: ubuntu-latest
if: ${{ false }} # disable since there are no jest test yet
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
......
......@@ -5,5 +5,5 @@ import appConfig from 'configs/app/config';
export default function useLoginUrl() {
const router = useRouter();
return appConfig.authUrl + route({ pathname: '/auth', query: { path: router.asPath } });
return appConfig.authUrl + route({ pathname: '/auth/auth0', query: { path: router.asPath } });
}
......@@ -22,7 +22,7 @@ export function middleware(req: NextRequest) {
const apiToken = req.cookies.get(NAMES.API_TOKEN);
if ((isAccountRoute || isProfileRoute) && !apiToken && appConfig.isAccountSupported) {
const authUrl = appConfig.authUrl + route({ pathname: '/auth', query: { path: req.nextUrl.pathname } });
const authUrl = appConfig.authUrl + route({ pathname: '/auth/auth0', query: { path: req.nextUrl.pathname } });
return NextResponse.redirect(authUrl);
}
......
import type { NextPage } from 'next';
const AuthPage: NextPage = () => {
const Auth0Page: NextPage = () => {
return null;
};
export default AuthPage;
export default Auth0Page;
export async function getServerSideProps() {
return {
......
......@@ -83,7 +83,7 @@ export interface AddressTokenTransferResponse {
export type AddressTokenTransferFilters = {
filter?: AddressFromToFilter;
type?: Array<TokenType>;
token?: string;
token_hash?: string;
}
export type AddressTokensFilter = {
......
......@@ -18,7 +18,7 @@ declare module "nextjs-routes" {
| StaticRoute<"/api/proxy">
| DynamicRoute<"/apps/[id]", { "id": string }>
| StaticRoute<"/apps">
| StaticRoute<"/auth">
| StaticRoute<"/auth/auth0">
| StaticRoute<"/auth/profile">
| DynamicRoute<"/block/[height]", { "height": string }>
| StaticRoute<"/blocks">
......
......@@ -87,7 +87,7 @@ const AddressTokenTransfers = ({ scrollRef }: {scrollRef?: React.RefObject<HTMLD
const { isError, isLoading, data, pagination, onFilterChange, isPaginationVisible } = useQueryWithPages({
resourceName: 'address_token_transfers',
pathParams: { hash: currentAddress },
filters: tokenFilter ? { token: tokenFilter } : filters,
filters: tokenFilter ? { token_hash: tokenFilter } : filters,
scrollRef,
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment