Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
songwongtp committed Sep 16, 2024
1 parent 7b9ec4b commit 17c9f9a
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 16 deletions.
7 changes: 2 additions & 5 deletions src/lib/pages/admin/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,10 @@ import type { BechAddr, BechAddr32 } from "lib/types";
import { MsgType } from "lib/types";
import { composeMsg } from "lib/utils";

import type { UpdateAdminQueryParams } from "./types";
import { zUpdateAdminQueryParams } from "./types";

const UpdateAdminBody = ({
contractAddress,
}: {
contractAddress: BechAddr32;
}) => {
const UpdateAdminBody = ({ contractAddress }: UpdateAdminQueryParams) => {
const router = useRouter();
const { address } = useCurrentChain();
const { validateContractAddress, validateUserAddress } = useValidateAddress();
Expand Down
1 change: 1 addition & 0 deletions src/lib/pages/admin/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ export const zUpdateAdminQueryParams = z
.transform((val) => ({
contractAddress: val.contract,
}));
export type UpdateAdminQueryParams = z.infer<typeof zUpdateAdminQueryParams>;
8 changes: 2 additions & 6 deletions src/lib/pages/interact/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {
} from "./component";
import { ModuleSelectDrawerMobile } from "./component/drawer/ModuleSelectDrawerMobile";
import { SelectedFunctionCard } from "./component/SelectedFunctionCard";
import type { InteractQueryParams } from "./types";
import { ModuleInteractionMobileStep, zInteractQueryParams } from "./types";

const FunctionSection = ({
Expand Down Expand Up @@ -122,12 +123,7 @@ const InteractBody = ({
moduleName,
functionName,
functionType,
}: {
address: Addr;
moduleName: string;
functionName: string;
functionType: string;
}) => {
}: InteractQueryParams) => {
const router = useRouter();
const isMobile = useMobile();
const navigate = useInternalNavigate();
Expand Down
2 changes: 1 addition & 1 deletion src/lib/pages/interact/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export enum ModuleInteractionMobileStep {
SelectFunction = "select-function",
}

// TODO: Handle default case
export const zInteractQueryParams = z.object({
address: zAddr.optional().default("" as Addr),
moduleName: z.string().optional().default(""),
functionName: z.string().optional().default(""),
functionType: z.string().optional().default(""),
});
export type InteractQueryParams = z.infer<typeof zInteractQueryParams>;
4 changes: 3 additions & 1 deletion src/lib/pages/pools/poolId.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const PoolIdBody = ({ poolId }: { poolId: number }) => {
);
};

export const PoolId = () => {
const PoolId = () => {
useTierConfig({ minTier: "full" });
usePoolConfig({ shouldRedirect: true });
const router = useRouter();
Expand All @@ -57,3 +57,5 @@ export const PoolId = () => {
</PageContainer>
);
};

export default PoolId;
1 change: 0 additions & 1 deletion src/lib/pages/public-project/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ interface PublicDataState {
isLoading: boolean;
}

// TODO - Revisit: handle when data is underfined
export const usePublicData = (slug: string): PublicDataState => {
const { data: projectInfo, isLoading } = usePublicProjectBySlug(slug);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/[network]/pools/[poolId].tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { PoolId } from "lib/pages/pools/poolId";
import PoolId from "lib/pages/pools/poolId";

export default PoolId;
2 changes: 1 addition & 1 deletion src/pages/pools/[poolId].tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { PoolId } from "lib/pages/pools/poolId";
import PoolId from "lib/pages/pools/poolId";

export default PoolId;

0 comments on commit 17c9f9a

Please sign in to comment.