Skip to content

Commit

Permalink
testing if prettier works
Browse files Browse the repository at this point in the history
  • Loading branch information
vmaineng committed Apr 23, 2024
1 parent 33f6039 commit 987c686
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
8 changes: 5 additions & 3 deletions api/authFunctions.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { account } from "./config"
import { NextRouter } from 'next/router';
import { useRouter } from "next/navigation"
// import { NextRouter } from 'next/router';

const router = useRouter();

export const login = async (router: NextRouter, email: string, password: string) => {
export const login = async (email: string, password: string) => {
try {
await account.createEmailPasswordSession(email, password);
router.push('/');
Expand All @@ -11,7 +13,7 @@ import { NextRouter } from 'next/router';
}
};

export const logout = async (router: NextRouter) => {
export const logout = async () => {
try {
await account.deleteSession('current');
router.push('/');
Expand Down
11 changes: 4 additions & 7 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
/** @type {import("prettier").Config} */
const config = {
module.exports = {
printWidth: 80,
semi: true,
singleQuote: true,
trailingComma: 'all',
printWidth: 80,
tabWidth: 2,
trailingComma: 'all',
plugins: [
// Automatically sorts tailwind classes to avoid speceficity issues
'prettier-plugin-tailwindcss', // MUST COME LAST
],
};

export default config;
};

0 comments on commit 987c686

Please sign in to comment.