diff --git a/.eslintrc.json b/.eslintrc.json index bffb357a7..92da9a123 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,3 +1,496 @@ { - "extends": "next/core-web-vitals" + "extends": [ + "next/core-web-vitals", + "eslint:recommended", + "plugin:@typescript-eslint/recommended" + ], + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint"], + "root": true, + "rules": { + "indent": [ + "error", + 4, + { + "SwitchCase": 1, + "VariableDeclarator": 1 + } + ], + // require function expressions to have a name + "func-names": "warn", + // enforce newline at the end of file, with no multiple empty lines + "eol-last": "error", + // disallow padding inside computed properties, ie. obj[ "fjie"] not allowed + "computed-property-spacing": [ + "error", + "never" + ], + "comma-style": [ + "error", + "last" + ], + // suggest using arrow functions as callbacks + "prefer-arrow-callback": "error", + // suggest using template literals instead of string concatenation + "prefer-template": "error", + // disallow modifying variables that are declared using const + "no-const-assign": "error", + // disallow symbol constructor + "no-new-symbol": "error", + // disallow to use this/super before super() calling in constructors. + "no-this-before-super": "error", + // require let or const instead of var + "no-var": "error", + // disallow unnecessary constructor + "no-useless-constructor": "error", + // require method and property shorthand syntax for object literals + // ie write obj = { x }, not obj = {x: x} + "object-shorthand": [ + "error", + "always" + ], + // disallow deletion of variables + "no-delete-var": "error", + // disallow labels that share a name with a variable + "no-label-var": "error", + // disallow self assignment + "no-self-assign": "error", + // disallow shadowing of names such as arguments + "no-shadow-restricted-names": "error", + // disallow declaration of variables already declared in the outer scope + "no-shadow": "error", + // disallow use of undeclared variables unless mentioned in a /*global */ block + "no-undef": "error", + // disallow declaration of variables that are not used in the code + "no-unused-vars": [ + "error", + { + "vars": "local", + "args": "after-used" + } + ], + // disallow use of variables before they are defined + "no-use-before-define": "error", + // enforces no braces where they can be omitted + "arrow-body-style": [ + "error", + "as-needed" + ], + // require space before/after arrow function"s arrow + "arrow-spacing": [ + "error", + { + "before": true, + "after": true + } + ], + // verify super() callings in constructors + "constructor-super": "error", + // disallow modifying variables of class declarations + "no-class-assign": "error", + // disallow arrow functions where they could be confused with comparisons + "no-confusing-arrow": [ + "error", + { + "allowParens": true + } + ], + // Require or disallow spaces before/after unary operators + "space-unary-ops": [ + "error", + { + "words": true, + "nonwords": false + } + ], + "quotes": [ + "error", + "single", + "avoid-escape" + ], + "jsx-quotes": ["error", "prefer-double"], + // require camel case names + "camelcase": [ + "error", + { + "properties": "never" + } + ], + // enforce spacing before and after comma + "comma-spacing": [ + "error", + { + "before": false, + "after": true + } + ], + // enforce one true comma style + "comma-style": [ + "error", + "last" + ], + "key-spacing": [ + "error", + { + "beforeColon": false, + "afterColon": true + } + ], + // require a space before & after certain keywords + "keyword-spacing": [ + "error", + { + "before": true, + "after": true, + "overrides": { + "return": { "after": true }, + "throw": { "after": true }, + "case": { "after": true } + } + } + ], + // disallow mixed "LF" and "CRLF" as linebreaks + "linebreak-style": [ + "error", + "unix" + ], + // specify the maximum length of a line in your program + "max-len": [ + "error", + 100, + 4, + { + "ignoreUrls": true, + "ignoreComments": false, + "ignoreTemplateLiterals": true, + "ignoreStrings": true, + "ignoreRegExpLiterals": true + } + ], + // specify the maximum depth callbacks can be nested + "max-nested-callbacks": [ + "error", + 3 + ], + // disallow the omission of parentheses when invoking a constructor with no arguments + "new-parens": "error", + // enforces new line after each method call in the chain to make it + // more readable and easy to maintain + "newline-per-chained-call": [ + "error", + { + "ignoreChainWithDepth": 4 + } + ], + // disallow use of the Array constructor + "no-array-constructor": "error", + // disallow use of the continue statement + "no-continue": "warn", + // disallow if as the only statement in an else block + "no-lonely-if": "error", + // disallow mixed spaces and tabs for indentation + "no-mixed-spaces-and-tabs": "error", + // disallow multiple empty lines and only one newline at the end + "no-multiple-empty-lines": [ + "error", + { + "max": 2, + "maxEOF": 1 + } + ], + // disallow nested ternary expressions + "no-nested-ternary": "error", + // disallow use of the Object constructor + "no-new-object": "error", + // disallow space between function identifier and application + "no-spaced-func": "error", + // disallow trailing whitespace at the end of lines + "no-trailing-spaces": "error", + // disallow the use of Boolean literals in conditional expressions + // also, prefer `a || b` over `a ? a : b` + "no-unneeded-ternary": [ + "error", + { + "defaultAssignment": true + } + ], + // disallow whitespace before properties + "no-whitespace-before-property": "error", + // require padding inside curly braces + "object-curly-spacing": [ + "error", + "always" + ], + // require a newline around variable declaration + "one-var-declaration-per-line": [ + "error", + "always" + ], + // enforce padding within blocks + "padded-blocks": [ + "error", + "never" + ], + // require quotes around object literal property names + "quote-props": [ + "warn", + "as-needed", + { + "keywords": false, + "unnecessary": true, + "numbers": false + } + ], + // specify whether double or single quotes should be used + // require or disallow use of semicolons instead of ASI + "semi": [ + "error", + "never" + ], + // require or disallow space before blocks + "space-before-blocks": "error", + // require or disallow space before function opening parenthesis + "space-before-function-paren": [ + "error", + { + "anonymous": "always", + "named": "never" + } + ], + // require or disallow spaces inside parentheses + "space-in-parens": [ + "error", + "never" + ], + // require spaces around operators + "space-infix-ops": "error", + // enforces return statements in callbacks of array"s methods + "array-callback-return": "error", + // require return statements to either always or never specify values + "consistent-return": "error", + // specify curly brace conventions for all control statements + "curly": [ + "error", + "multi-line" + ], + // require default case in switch statements + "default-case": "error", + // encourages use of dot notation whenever possible + "dot-notation": "error", + // require the use of === and !== + "eqeqeq": "error", + // make sure for-in loops have an if statement + "guard-for-in": "error", + // disallow the use of alert, confirm, and prompt + "no-alert": "warn", + // disallow use of arguments.caller or arguments.callee + "no-caller": "error", + // disallow lexical declarations in case/default clauses + "no-case-declarations": "error", + // disallow else after a return in an if + "no-else-return": "error", + // disallow Unnecessary Labels + "no-extra-label": "error", + // disallow comparisons to null without a type-checking operator + "no-eq-null": "error", + // disallow use of eval() + "no-eval": "error", + // disallow adding to native types + "no-extend-native": "error", + // disallow unnecessary function binding + "no-extra-bind": "error", + // disallow fallthrough of case statements + "no-fallthrough": "error", + // disallow the use of leading or trailing decimal points in numeric literals + "no-floating-decimal": "error", + // disallow use of eval()-like methods + "no-implied-eval": "error", + // disallow this keywords outside of classes or class-like objects + "no-iterator": "error", + // disallow use of labels for anything other then loops and switches + "no-labels": [ + "error", + { + "allowLoop": false, + "allowSwitch": false + } + ], + // disallow unnecessary nested blocks + "no-lone-blocks": "error", + // disallow creation of functions within loops + "no-loop-func": "error", + // disallow use of multiple spaces + "no-multi-spaces": "error", + // disallow use of multiline strings + "no-multi-str": "error", + // disallow reassignments of native objects + "no-native-reassign": "error", + // disallow use of new operator when not part of the assignment or comparison + "no-new": "error", + // disallow use of new operator for Function object + "no-new-func": "error", + // disallows creating new instances of String,Number, and Boolean + "no-new-wrappers": "error", + // disallow use of (old style) octal literals + "no-octal": "error", + // disallow use of octal escape sequences in string literals, such as + // var foo = "Copyright \251"; + "no-octal-escape": "error", + // disallow reassignment of function parameters + // disallow parameter object manipulation + "no-param-reassign": [ + "warn", + { + "props": false + } + ], + // disallow usage of __proto__ property + "no-proto": "error", + // disallow declaring the same variable more then once + "no-redeclare": "error", + // disallow use of assignment in return statement + "no-return-assign": "error", + // disallow use of `javascript:` urls. + "no-script-url": "error", + // disallow comparisons where both sides are exactly the same + "no-self-compare": "error", + // disallow use of comma operator + "no-sequences": "error", + // disallow usage of expressions in statement position + "no-unused-expressions": "error", + // disallow unused labels + "no-unused-labels": "error", + // disallow usage of configurable warning terms in comments: e.g. todo + "no-warning-comments": [ + "warn", + { + "terms": ["todo", "fixme", "xxx"], + "location": "start" + } + ], + // disallow use of the with statement + "no-with": "error", + // require use of the second argument for parseInt() + "radix": "error", + // require immediate function invocation to be wrapped in parentheses + "wrap-iife": [ + "error", + "outside" + ], + // require or disallow Yoda conditions + "yoda": "error", + // disallow assignment in conditional expressions + "no-cond-assign": [ + "error", + "always" + ], + // disallow use of constant expressions in conditions + "no-constant-condition": "warn", + // disallow control characters in regular expressions + "no-control-regex": "error", + // disallow use of debugger + "no-debugger": "warn", + // disallow duplicate arguments in functions + "no-dupe-args": "error", + // disallow duplicate keys when creating object literals + "no-dupe-keys": "error", + // disallow a duplicate case label. + "no-duplicate-case": "error", + // disallow the use of empty character classes in regular expressions + "no-empty-character-class": "error", + // disallow empty statements + "no-empty": "error", + // disallow assigning to the exception in a catch block + "no-ex-assign": "error", + // disallow double-negation boolean casts in a boolean context + "no-extra-boolean-cast": "error", + // disallow unnecessary parentheses + "no-extra-parens": [ + "error", + "functions" + ], + // disallow unnecessary semicolons + "no-extra-semi": "error", + // disallow overwriting functions written as function declarations + "no-func-assign": "error", + // disallow function or variable declarations in nested blocks + "no-inner-declarations": "error", + // disallow invalid regular expression strings in the RegExp constructor + "no-invalid-regexp": "error", + // disallow irregular whitespace outside of strings and comments + "no-irregular-whitespace": "error", + // disallow negation of the left operand of an in expression + "no-negated-in-lhs": "error", + // disallow the use of object properties of the global object (Math and JSON) as functions + "no-obj-calls": "error", + // disallow multiple spaces in a regular expression literal + "no-regex-spaces": "error", + // disallow sparse arrays + "no-sparse-arrays": "error", + // disallow unreachable statements after a return, throw, continue, or break statement + "no-unreachable": "error", + // disallow comparisons with the value NaN + "use-isnan": "error", + // ensure JSDoc comments are valid + "valid-jsdoc": "warn", + // ensure that the results of typeof are compared against a valid string + "valid-typeof": "error", + // Avoid code that looks like two expressions but is actually one + "no-unexpected-multiline": "error", + // specify the maximum depth that blocks can be nested + "max-depth": [ + "error", + 4 + ], + // limits the number of parameters that can be used in the function declaration. + "max-params": [ + "error", + 4 + ], + // disallow use of bitwise operators + "no-bitwise": "warn", + // enforce return after a callback + "callback-return": "error", + // enforces error handling in callbacks (node environment) + "handle-callback-err": "error", + // disallow mixing regular variable and require declarations + "no-mixed-requires": [ + "error", + { + "grouping": true, + "allowCall": true + } + ], + // disallow use of new operator with the require function + "no-new-require": "error", + // disallow string concatenation with __dirname and __filename + "no-path-concat": "error", + // disallow process.exit() + "no-process-exit": "error", + // disallow use of synchronous methods (off by default) + "no-sync": "error", + // enforce spacing inside array brackets + "array-bracket-spacing": [ + "error", + "never" + ], + // enforce one true brace style + "brace-style": [ + "error", + "1tbs", + { + "allowSingleLine": true + } + ], + + //SOME ODD OPTIONS: + // suggest using the spread operator instead of .apply() + "prefer-spread": "error", + // suggest using Reflect methods where applicable + "prefer-reflect": "error", + // use rest parameters instead of arguments + "prefer-rest-params": "error", + // enforce usage of spacing in template strings + "template-curly-spacing": "error" + } } diff --git a/package-lock.json b/package-lock.json index 99edbed35..692339056 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,6 +31,8 @@ "@types/react": "^18.2.33", "@types/react-dom": "^18.2.14", "@types/uuid": "^9.0.6", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "@typescript-eslint/parser": "^6.9.1", "prisma": "^5.4.2", "typescript": "^5.2.2" } @@ -450,6 +452,12 @@ "@types/react": "*" } }, + "node_modules/@types/json-schema": { + "version": "7.0.14", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", + "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", + "dev": true + }, "node_modules/@types/json5": { "version": "0.0.29", "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", @@ -496,21 +504,62 @@ "integrity": "sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw==", "dev": true }, + "node_modules/@types/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", + "dev": true + }, "node_modules/@types/uuid": { "version": "9.0.6", "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.6.tgz", "integrity": "sha512-BT2Krtx4xaO6iwzwMFUYvWBWkV2pr37zD68Vmp1CDV196MzczBRxuEpD6Pr395HAgebC/co7hOphs53r8V7jew==", "dev": true }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.9.1.tgz", + "integrity": "sha512-w0tiiRc9I4S5XSXXrMHOWgHgxbrBn1Ro+PmiYhSg2ZVdxrAJtQgzU5o2m1BfP6UOn7Vxcc6152vFjQfmZR4xEg==", + "dev": true, + "dependencies": { + "@eslint-community/regexpp": "^4.5.1", + "@typescript-eslint/scope-manager": "6.9.1", + "@typescript-eslint/type-utils": "6.9.1", + "@typescript-eslint/utils": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", + "debug": "^4.3.4", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/@typescript-eslint/parser": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.4.1.tgz", - "integrity": "sha512-610G6KHymg9V7EqOaNBMtD1GgpAmGROsmfHJPXNLCU9bfIuLrkdOygltK784F6Crboyd5tBFayPB7Sf0McrQwg==", - "dependencies": { - "@typescript-eslint/scope-manager": "6.4.1", - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/typescript-estree": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.9.1.tgz", + "integrity": "sha512-C7AK2wn43GSaCUZ9do6Ksgi2g3mwFkMO3Cis96kzmgudoVaKyt62yNzJOktP0HDLb/iO2O0n2lBOzJgr6Q/cyg==", + "dependencies": { + "@typescript-eslint/scope-manager": "6.9.1", + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/typescript-estree": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", "debug": "^4.3.4" }, "engines": { @@ -530,12 +579,31 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.4.1.tgz", - "integrity": "sha512-p/OavqOQfm4/Hdrr7kvacOSFjwQ2rrDVJRPxt/o0TOWdFnjJptnjnZ+sYDR7fi4OimvIuKp+2LCkc+rt9fIW+A==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.9.1.tgz", + "integrity": "sha512-38IxvKB6NAne3g/+MyXMs2Cda/Sz+CEpmm+KLGEM8hx/CvnSRuw51i8ukfwB/B/sESdeTGet1NH1Wj7I0YXswg==", + "dependencies": { + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/type-utils": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.9.1.tgz", + "integrity": "sha512-eh2oHaUKCK58qIeYp19F5V5TbpM52680sB4zNSz29VBQPTWIlE/hCj5P5B1AChxECe/fmZlspAWFuRniep1Skg==", + "dev": true, "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1" + "@typescript-eslint/typescript-estree": "6.9.1", + "@typescript-eslint/utils": "6.9.1", + "debug": "^4.3.4", + "ts-api-utils": "^1.0.1" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -543,12 +611,20 @@ "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/@typescript-eslint/types": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.4.1.tgz", - "integrity": "sha512-zAAopbNuYu++ijY1GV2ylCsQsi3B8QvfPHVqhGdDcbx/NK5lkqMnCGU53amAjccSpk+LfeONxwzUhDzArSfZJg==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.9.1.tgz", + "integrity": "sha512-BUGslGOb14zUHOUmDB2FfT6SI1CcZEJYfF3qFwBeUrU6srJfzANonwRYHDpLBuzbq3HaoF2XL2hcr01c8f8OaQ==", "engines": { "node": "^16.0.0 || >=18.0.0" }, @@ -558,12 +634,12 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.4.1.tgz", - "integrity": "sha512-xF6Y7SatVE/OyV93h1xGgfOkHr2iXuo8ip0gbfzaKeGGuKiAnzS+HtVhSPx8Www243bwlW8IF7X0/B62SzFftg==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.9.1.tgz", + "integrity": "sha512-U+mUylTHfcqeO7mLWVQ5W/tMLXqVpRv61wm9ZtfE5egz7gtnmqVIw9ryh0mgIlkKk9rZLY3UHygsBSdB9/ftyw==", "dependencies": { - "@typescript-eslint/types": "6.4.1", - "@typescript-eslint/visitor-keys": "6.4.1", + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/visitor-keys": "6.9.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -583,12 +659,37 @@ } } }, + "node_modules/@typescript-eslint/utils": { + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.9.1.tgz", + "integrity": "sha512-L1T0A5nFdQrMVunpZgzqPL6y2wVreSyHhKGZryS6jrEN7bD9NplVAyMryUhXsQ4TWLnZmxc2ekar/lSGIlprCA==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.4.0", + "@types/json-schema": "^7.0.12", + "@types/semver": "^7.5.0", + "@typescript-eslint/scope-manager": "6.9.1", + "@typescript-eslint/types": "6.9.1", + "@typescript-eslint/typescript-estree": "6.9.1", + "semver": "^7.5.4" + }, + "engines": { + "node": "^16.0.0 || >=18.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^7.0.0 || ^8.0.0" + } + }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.4.1.tgz", - "integrity": "sha512-y/TyRJsbZPkJIZQXrHfdnxVnxyKegnpEvnRGNam7s3TRR2ykGefEWOhaef00/UUN3IZxizS7BTO3svd3lCOJRQ==", + "version": "6.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.9.1.tgz", + "integrity": "sha512-MUaPUe/QRLEffARsmNfmpghuQkW436DvESW+h+M52w0coICHRfD6Np9/K6PdACwnrq1HmuLl+cSPZaJmeVPkSw==", "dependencies": { - "@typescript-eslint/types": "6.4.1", + "@typescript-eslint/types": "6.9.1", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/package.json b/package.json index 50e8bc4a6..466ae0fe8 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,8 @@ "@types/react": "^18.2.33", "@types/react-dom": "^18.2.14", "@types/uuid": "^9.0.6", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "@typescript-eslint/parser": "^6.9.1", "prisma": "^5.4.2", "typescript": "^5.2.2" } diff --git a/src/app/(auth)/CsrfToken.tsx b/src/app/(auth)/CsrfToken.tsx index 4f08fefb6..df591ada7 100644 --- a/src/app/(auth)/CsrfToken.tsx +++ b/src/app/(auth)/CsrfToken.tsx @@ -1,6 +1,6 @@ -"use client" +'use client' -import { getCsrfToken } from "next-auth/react" +import { getCsrfToken } from 'next-auth/react' async function CsrfToken() { // getCsrfToken må kjøres på klientsiden* @@ -15,4 +15,4 @@ async function CsrfToken() { ) } -export default CsrfToken \ No newline at end of file +export default CsrfToken diff --git a/src/app/(auth)/login/page.tsx b/src/app/(auth)/login/page.tsx index 6538e158e..afd282bba 100644 --- a/src/app/(auth)/login/page.tsx +++ b/src/app/(auth)/login/page.tsx @@ -1,25 +1,25 @@ import FormInput from '@/components/FormInput/FormInput' import styles from './page.module.scss' -import magiskHatt from "@/images/magisk_hatt.png" +import magiskHatt from '@/images/magisk_hatt.png' import Image from 'next/image' import PrimaryButton from '@/components/PrimaryButton/PrimaryButton' import CsrfToken from '../CsrfToken' export default async function LogIn() { - return ( -