-
Notifications
You must be signed in to change notification settings - Fork 0
We have a social site now... #1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
const payload = { | ||
email: document.getElementById('email')?.value?.trim(), | ||
username: document.getElementById('username')?.value?.trim(), | ||
firstName: document.getElementById('firstName')?.value?.trim() || null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
Too many errors. (72% scanned).
e.preventDefault(); | ||
const payload = { | ||
email: document.getElementById('email')?.value?.trim(), | ||
username: document.getElementById('username')?.value?.trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected ')' and instead saw 'document'.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 30 and instead saw ':'.
Expected an assignment or function call and instead saw an expression.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.
Missing semicolon.
const 'username' is initialized to 'undefined'.
form.addEventListener('submit', async (e) => { | ||
e.preventDefault(); | ||
const payload = { | ||
email: document.getElementById('email')?.value?.trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad invocation.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 41 and instead saw 'trim'.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.
|
||
form.addEventListener('submit', async (e) => { | ||
e.preventDefault(); | ||
const payload = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
if (!form) return; | ||
|
||
form.addEventListener('submit', async (e) => { | ||
e.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Expected ')' and instead saw ';'.
Expected ')' to match '{' from line 39 and instead saw '.'.
Missing semicolon.
headers: { 'Content-Type': 'application/json' }, | ||
body: JSON.stringify(payload) | ||
}); | ||
const data = await resp.json().catch(() => ({})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.
* @returns {Promise<object>} created account detail | ||
*/ | ||
async function signup(payload) { | ||
const resp = await fetch(API.accounts.create, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.
* @param {{email:string,username:string,firstName?:string,lastName?:string,password:string}} payload | ||
* @returns {Promise<object>} created account detail | ||
*/ | ||
async function signup(payload) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
* Redirects authenticated users away. | ||
*/ | ||
import { API } from '../lib/api.js'; | ||
const alertBox = () => document.getElementById('signupAlert'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
* Submits new account details to the API and redirects to login on success. | ||
* Redirects authenticated users away. | ||
*/ | ||
import { API } from '../lib/api.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'import' is only available in ES6 (use 'esversion: 6').
const payload = { | ||
email: document.getElementById('email')?.value?.trim(), | ||
username: document.getElementById('username')?.value?.trim(), | ||
firstName: document.getElementById('firstName')?.value?.trim() || null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
Too many errors. (72% scanned).
e.preventDefault(); | ||
const payload = { | ||
email: document.getElementById('email')?.value?.trim(), | ||
username: document.getElementById('username')?.value?.trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected ')' and instead saw 'document'.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 30 and instead saw ':'.
Expected an assignment or function call and instead saw an expression.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.
Missing semicolon.
const 'username' is initialized to 'undefined'.
form.addEventListener('submit', async (e) => { | ||
e.preventDefault(); | ||
const payload = { | ||
email: document.getElementById('email')?.value?.trim(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad invocation.
Expected ':' and instead saw 'value'.
Expected '}' to match '{' from line 41 and instead saw 'trim'.
Expected an identifier and instead saw '.'.
Expected an identifier and instead saw '?'.
Expected an operator and instead saw '.'.
|
||
form.addEventListener('submit', async (e) => { | ||
e.preventDefault(); | ||
const payload = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
if (!form) return; | ||
|
||
form.addEventListener('submit', async (e) => { | ||
e.preventDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Expected ')' and instead saw ';'.
Expected ')' to match '{' from line 39 and instead saw '.'.
Missing semicolon.
headers: { 'Content-Type': 'application/json' }, | ||
body: JSON.stringify(payload) | ||
}); | ||
const data = await resp.json().catch(() => ({})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.
* @returns {Promise<object>} created account detail | ||
*/ | ||
async function signup(payload) { | ||
const resp = await fetch(API.accounts.create, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
Missing semicolon.
* @param {{email:string,username:string,firstName?:string,lastName?:string,password:string}} payload | ||
* @returns {Promise<object>} created account detail | ||
*/ | ||
async function signup(payload) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
* Redirects authenticated users away. | ||
*/ | ||
import { API } from '../lib/api.js'; | ||
const alertBox = () => document.getElementById('signupAlert'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
* Submits new account details to the API and redirects to login on success. | ||
* Redirects authenticated users away. | ||
*/ | ||
import { API } from '../lib/api.js'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'import' is only available in ES6 (use 'esversion: 6').
if (toggler && target && !hasBootstrap) { | ||
toggler.addEventListener('click', (e) => { | ||
e.preventDefault(); | ||
const isShown = target.classList.contains('show'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
const target = this.querySelector('#navbarSupportedContent'); | ||
const hasBootstrap = typeof window !== 'undefined' && window.bootstrap && window.bootstrap.Collapse; | ||
if (toggler && target && !hasBootstrap) { | ||
toggler.addEventListener('click', (e) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
// Otherwise, add a minimal vanilla fallback toggle. | ||
const toggler = this.querySelector('.navbar-toggler'); | ||
const target = this.querySelector('#navbarSupportedContent'); | ||
const hasBootstrap = typeof window !== 'undefined' && window.bootstrap && window.bootstrap.Collapse; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
// Mobile toggler: if Bootstrap JS is present, let it handle. | ||
// Otherwise, add a minimal vanilla fallback toggle. | ||
const toggler = this.querySelector('.navbar-toggler'); | ||
const target = this.querySelector('#navbarSupportedContent'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
|
||
// Mobile toggler: if Bootstrap JS is present, let it handle. | ||
// Otherwise, add a minimal vanilla fallback toggle. | ||
const toggler = this.querySelector('.navbar-toggler'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
/** Wire page once DOM is ready. */ | ||
document.addEventListener('DOMContentLoaded', async () => { | ||
// Load current user to determine delete permissions before first render | ||
const token = localStorage.getItem('cbellLoginToken'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
Expected ')' and instead saw 'localStorage'.
Expected ')' to match '{' from line 66 and instead saw 'token'.
Expected an identifier and instead saw '='.
Expected an identifier and instead saw 'const' (a reserved word).
} | ||
|
||
/** Wire page once DOM is ready. */ | ||
document.addEventListener('DOMContentLoaded', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected '(' and instead saw '{'.
if (postText) postText.value = ''; | ||
const counter = document.getElementById('charCount'); | ||
if (counter && postText) updateCounter(postText, counter); | ||
await loadFeed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected an assignment or function call and instead saw an expression.
Missing semicolon.
body: JSON.stringify({ text }) | ||
}); | ||
if (postText) postText.value = ''; | ||
const counter = document.getElementById('charCount'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
await fetchJson(API.posts.create, { | ||
method: 'POST', | ||
headers: authHeaders(), | ||
body: JSON.stringify({ text }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'object short notation' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
No description provided.