Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

chore: update admin panel #245

Merged
merged 1 commit into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
check-code:
yarn check-code
yarn tsc:check
# yarn eslint:check
yarn prettier:check

test:
yarn test
Expand Down
4 changes: 2 additions & 2 deletions components/account/business-map-update.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { useState, useEffect } from "react"
import { AccountBusinessInfo } from "./index"
import { Account } from "../../generated"
import { AuditedAccount } from "../../generated"

const isValidLatitude = (latitude: number) =>
isFinite(latitude) && Math.abs(latitude) <= 90
Expand All @@ -15,7 +15,7 @@ const isValidBusinessInfo = ({ title, coordinates }: AccountBusinessInfo) =>
isValidTitle(title)

const BusinessMapUpdate: React.FC<{
accountDetails: Account
accountDetails: AuditedAccount
update: (info: AccountBusinessInfo) => void
deleteBusiness: (username: string) => void
updating: boolean
Expand Down
4 changes: 2 additions & 2 deletions components/account/details.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client"

import { Account } from "../../generated"
import { AuditedAccount } from "../../generated"
import { formatDate } from "../../utils"

const Details: React.FC<{
accountDetails: Account
accountDetails: AuditedAccount
loading?: boolean
}> = ({ accountDetails, loading = false }) => {
const data = accountDetails
Expand Down
4 changes: 2 additions & 2 deletions components/account/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import BusinessMapUpdate from "./business-map-update"
import { validPhone, validUsername, reportError } from "../../utils"

import {
Account,
AuditedAccount,
AccountLevel,
AccountStatus,
Coordinates,
Expand All @@ -32,7 +32,7 @@ export type AccountBusinessInfo = {
}

function AccountDetails() {
const [data, setData] = useState<null | Account>(null)
const [data, setData] = useState<null | AuditedAccount>(null)
const [searchValue, setSearchValue] = useState("")

const [updateAccountStatus, { loading: loadingAccountStatus }] =
Expand Down
4 changes: 2 additions & 2 deletions components/account/update.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client"

import { Account } from "../../generated"
import { AuditedAccount } from "../../generated"

type PropType = {
accountDetails: Account
accountDetails: AuditedAccount
updateLevel: () => void
updatingLevel: boolean
updateStatus: () => void
Expand Down
78 changes: 42 additions & 36 deletions generated.ts

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
},
"scripts": {
"build": "next build",
"check-code": "yarn tsc:check && yarn eslint:check && yarn prettier:check",
"codegen": "graphql-codegen --config codegen.yml",
"dev": "next dev",
"eslint:check": "next lint",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}