Skip to content

Commit

Permalink
fixed a typo in the api call
Browse files Browse the repository at this point in the history
  • Loading branch information
poswalsameer committed Dec 9, 2024
1 parent 4a8d7d3 commit 737ad96
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions apps/platform/src/app/(main)/project/[project]/@secret/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ function SecretPage(): React.JSX.Element {
process.env.NEXT_PUBLIC_BACKEND_URL
)

async function getAllSecretsByProjectSlug(){
const {success, error, data} = await secretController.getAllSecretsOfProject(
{projectSlug: pathname.split('/'[2])},
{}
)
async function getAllSecretsByProjectSlug() {
const { success, error, data } =
await secretController.getAllSecretsOfProject(
{ projectSlug: pathname.split('/')[2] },
{}
)

if( success && data ){
if (success && data) {
//@ts-ignore
setAllSecrets(data)
}
else{
} else {
// eslint-disable-next-line no-console -- we need to log the error
console.error(error)
}
Expand All @@ -63,7 +63,6 @@ function SecretPage(): React.JSX.Element {
getAllSecretsByProjectSlug()

setIsLoading(false)

}, [pathname])

if (isLoading) {
Expand Down Expand Up @@ -95,9 +94,7 @@ function SecretPage(): React.JSX.Element {
rightChildren={
<div className="text-xs text-white/50">
{dayjs(secret.updatedAt).toNow(true)} ago by{' '}
<span className="text-white">
{secret.lastUpdatedById}
</span>
<span className="text-white">{secret.lastUpdatedById}</span>
</div>
}
>
Expand Down

0 comments on commit 737ad96

Please sign in to comment.