Skip to content

Commit

Permalink
chore: run prettier on client files
Browse files Browse the repository at this point in the history
  • Loading branch information
Sepehr-Sobhani committed Sep 19, 2023
1 parent 361cd7a commit 0a5b961
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
11 changes: 6 additions & 5 deletions client/app/api/counter/route.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
/* Core */
import { NextResponse } from 'next/server'
import { NextResponse } from "next/server";

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export async function POST(req: Request, res: Response) {
const body = await req.json()
const { amount = 1 } = body
const body = await req.json();
const { amount = 1 } = body;

// simulate IO latency
await new Promise((r) => setTimeout(r, 500))
await new Promise((r) => setTimeout(r, 500));

return NextResponse.json({ data: amount })
return NextResponse.json({ data: amount });
}
8 changes: 5 additions & 3 deletions client/app/components/Counter/counter.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
padding-left: 16px;
padding-right: 16px;
margin-top: 2px;
font-family: 'Courier New', Courier, monospace;
font-family: "Courier New", Courier, monospace;
}

.button {
Expand Down Expand Up @@ -60,7 +60,7 @@
}

.asyncButton:after {
content: '';
content: "";
background-color: rgba(112, 76, 182, 0.15);
display: block;
position: absolute;
Expand All @@ -69,7 +69,9 @@
left: 0;
top: 0;
opacity: 0;
transition: width 1s linear, opacity 0.5s ease 1s;
transition:
width 1s linear,
opacity 0.5s ease 1s;
}

.asyncButton:active:after {
Expand Down
8 changes: 4 additions & 4 deletions client/app/styles/layout.module.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.container {
display: grid;
grid-template-areas:
'nav'
'header'
'main'
'footer';
"nav"
"header"
"main"
"footer";
grid-template-rows: auto auto 1fr 36px;
align-items: center;
min-height: 100vh;
Expand Down
2 changes: 1 addition & 1 deletion client/redux/features/counter/thunks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export const incrementAsync = createAppAsyncThunk(
// 2. Thunk function
const response = await fetchCount(amount); // 3. Asynchronous logic
return response.data; // 4. Data returned by the asynchronous logic- the `fulfilled` action payload
}
},
);

0 comments on commit 0a5b961

Please sign in to comment.