Skip to content

Commit

Permalink
🧼 format & lint (CHASE Frontend): Removing (or ignoring) all console.…
Browse files Browse the repository at this point in the history
…log to make linter test pass

branch: locale-detection-and-language-selection
  • Loading branch information
Strehk committed Jul 4, 2023
1 parent 51ceeef commit 4920427
Show file tree
Hide file tree
Showing 12 changed files with 9 additions and 32 deletions.
3 changes: 3 additions & 0 deletions chase/backend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export let server: FastifyInstance;
},
});

// rome-ignore lint: console output is intended
console.log(`
╔══════════════════════════════════════════════════════════════════╗
║ Serving API documentation on http://localhost:${PORT}/documentation ║
Expand Down Expand Up @@ -155,6 +156,7 @@ export let server: FastifyInstance;
if (!process.env.PRODUCTION) {
server.swagger();
}
// rome-ignore lint: console output is intended
console.log(`Running on port ${PORT}`);
await server.listen({ port: PORT, host: "0.0.0.0" });
db?.$disconnect();
Expand All @@ -164,4 +166,5 @@ export let server: FastifyInstance;
}
})();

// rome-ignore lint: console output is intended
console.log("Starting server...");
1 change: 0 additions & 1 deletion chase/frontend/app/chair/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default function ParticipantDashboard() {

useEffect(() => {
const intervalAPICall = setInterval(() => {
console.log("API Call");
setData(apiTestData);
}, 1000);
return () => clearInterval(intervalAPICall);
Expand Down
1 change: 0 additions & 1 deletion chase/frontend/app/chair/speakers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export default function ChairSpeakersList() {

useEffect(() => {
const intervalAPICall = setInterval(() => {
console.log("API Call");
setData(apiTestData);
}, 1000);
return () => clearInterval(intervalAPICall);
Expand Down
4 changes: 1 addition & 3 deletions chase/frontend/app/chair/voting/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ export default function ChairVoting() {
label={LL.chairs.voting.BUTTON_NEW_MOTION()}
icon={<FontAwesomeIcon icon={faGavel} className="mr-2" />}
className="w-full"
onClick={() => {
console.log("API call to create a new motion");
}}
onClick={() => {}}
model={[]}
/>
<Motions
Expand Down
5 changes: 1 addition & 4 deletions chase/frontend/app/chair/whiteboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@ export default function ChairWhiteboard() {
const [whiteboardContent, setWhiteboardContent] =
React.useState<string>(whiteboardTestData);

const pushWhiteboardContent = () => {
console.log("Pushing whiteboard content to server...", whiteboardContent);
};
const pushWhiteboardContent = () => {};

const resetWhiteboardContent = () => {
console.log("Resetting whiteboard content...");
setWhiteboardContent(whiteboardTestData);
};

Expand Down
1 change: 0 additions & 1 deletion chase/frontend/app/participant/dashboard/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export default function participant_dashboard() {

useEffect(() => {
const intervalAPICall = setInterval(() => {
console.log("API Call");
setData(apiTestData);
}, 1000);
return () => clearInterval(intervalAPICall);
Expand Down
1 change: 0 additions & 1 deletion chase/frontend/app/participant/speakers/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export default function SpeakersList() {

useEffect(() => {
const intervalAPICall = setInterval(() => {
console.log("API Call");
setData(apiTestData);
}, 1000);
return () => clearInterval(intervalAPICall);
Expand Down
4 changes: 1 addition & 3 deletions chase/frontend/components/navbar/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ export default function Navbar({ children }: { children: React.ReactNode }) {
router.push("/login/participant");
};

const rejectLogout = () => {
console.log("Logout rejected");
};
const rejectLogout = () => {};

const confirmLogout = () => {
confirmDialog({
Expand Down
2 changes: 0 additions & 2 deletions chase/frontend/components/navbar/settings_sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ export default function SettingsSidebar({
if (colortheme === "system") {
document.documentElement.classList.remove("contrast");
if (isDarkMode) {
console.log("dark");
document.documentElement.classList.add("dark");
} else {
console.log("light");
document.documentElement.classList.remove("dark");
}
} else if (colortheme === "light") {
Expand Down
1 change: 0 additions & 1 deletion chase/frontend/components/speakers_list/add_speaker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export default function AddSpeakerOverlay({
}) {
const { LL, locale } = useI18nContext();
const { showToast } = useContext(ToastContext);
console.log(showToast);

const [countries, setCountries] = useState<CountryData[] | null>(null);
const [query, setQuery] = useState<string>("");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ export default function ChangeSpeechTimeOverlay({
return;
}

console.log(
`API call to change the speech time (in seconds): ${calculateSecondsFromTime(
time,
)}`,
);

showToast({
severity: "success",
summary: LL.chairs.speakersList.changeSpeechTimeOverlay.TOAST_SUCCESS(
Expand Down
12 changes: 3 additions & 9 deletions chase/frontend/components/voting/voting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,18 @@ export default function VotingArea({
<Button
label={LL.chairs.voting.BUTTON_CHANGE_INFO()}
faIcon={faInfo}
onClick={() => {
console.log("Change Info");
}}
onClick={() => {}}
/>
<Button
label={LL.chairs.voting.BUTTON_RESET()}
faIcon={faUndo}
onClick={() => {
console.log("Reset");
}}
onClick={() => {}}
severity="warning"
/>
<Button
label={LL.chairs.voting.BUTTON_DELETE()}
faIcon={faTrash}
onClick={() => {
console.log("Delete");
}}
onClick={() => {}}
severity="danger"
/>
</div>
Expand Down

0 comments on commit 4920427

Please sign in to comment.