remove abusive log

This commit is contained in:
Kilton937342 2022-06-24 17:27:17 +02:00
parent 7331f20423
commit 29c99334b2
13 changed files with 18 additions and 18 deletions

View File

@ -175,7 +175,7 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images) # Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/ # https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL = 'static/' STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static') STATIC_ROOT = os.path.join(BASE_DIR, 'static')

View File

@ -24,7 +24,7 @@ function CardComp({ step, setActive, deleted, tags, queryKey }) {
{ {
onSuccess: (data, variables, context) => { onSuccess: (data, variables, context) => {
queryClient.setQueryData(queryKey, (old) => { queryClient.setQueryData(queryKey, (old) => {
console.log("test old", old);
return { return {
...old, ...old,
results: [ results: [
@ -47,7 +47,7 @@ function CardComp({ step, setActive, deleted, tags, queryKey }) {
setTagMode(false); setTagMode(false);
}, },
onError: (data) => { onError: (data) => {
console.log("ERROR", data);
notificationService.error( notificationService.error(
"Erreur", "Erreur",
`Les tags de ${step.name} n'ont pu être modifiés !` `Les tags de ${step.name} n'ont pu être modifiés !`
@ -68,7 +68,7 @@ function CardComp({ step, setActive, deleted, tags, queryKey }) {
queryClient.invalidateQueries(queryKey); queryClient.invalidateQueries(queryKey);
} }
queryClient.setQueriesData(queryKey, (old) => { queryClient.setQueriesData(queryKey, (old) => {
console.log("test old", old);
return { return {
...old, ...old,
results: [ results: [
@ -92,7 +92,7 @@ function CardComp({ step, setActive, deleted, tags, queryKey }) {
setTagMode(false); setTagMode(false);
}, },
onError: (e) => { onError: (e) => {
console.log(e);
notificationService.error( notificationService.error(
"Erreur", "Erreur",
`Le tag n'a pu être retiré de ${step.name} !` `Le tag n'a pu être retiré de ${step.name} !`

View File

@ -143,7 +143,7 @@ export default function ExoCreateForm({ cancel, resetFilter }) {
type="checkbox" type="checkbox"
checked={newExo.private} checked={newExo.private}
onChange={(e) => { onChange={(e) => {
console.log(e.target);
setNewExo({ ...newExo, private: !newExo.private }); setNewExo({ ...newExo, private: !newExo.private });
}} }}
/> />

View File

@ -133,7 +133,7 @@ export function ExoEditForm({ step, cancel, setFull, full }) {
type="checkbox" type="checkbox"
checked={spec.private} checked={spec.private}
onChange={(e) => { onChange={(e) => {
console.log(e.target);
setSpec({ ...spec, private: !spec.private }); setSpec({ ...spec, private: !spec.private });
}} }}
/> />

View File

@ -120,7 +120,7 @@ export default function ModalCard({ step, onClose, onDelete, tags, queryKey }) {
return { ...old, tags: data.data.tags }; return { ...old, tags: data.data.tags };
}); });
queryClient.setQueryData(queryKey, (old) => { queryClient.setQueryData(queryKey, (old) => {
console.log("test old", old);
return { return {
...old, ...old,
results: [ results: [

View File

@ -97,7 +97,7 @@ export function Pagination({ setPage, page, pages }) {
: page + 3 : page + 3
) )
.map((p) => { .map((p) => {
console.log("new pagin", p);
return ( return (
<p <p
onClick={() => { onClick={() => {

View File

@ -21,7 +21,7 @@ export default function StepOptions({ pageChange, serieChange }) {
e.target.value == '' e.target.value == ''
); );
if (!isNaN(parseInt(e.target.value, 10))) { if (!isNaN(parseInt(e.target.value, 10))) {
console.log("nope");
if (parseInt(e.target.value, 10) > 100) { if (parseInt(e.target.value, 10) > 100) {
setPage(100); setPage(100);
pageChange && pageChange(100); pageChange && pageChange(100);

View File

@ -72,7 +72,7 @@ export default function ModelInput({
var filename = e.target.files[0].name; var filename = e.target.files[0].name;
var splitting = filename.split("."); var splitting = filename.split(".");
if (splitting[splitting.length - 1] != "py") { if (splitting[splitting.length - 1] != "py") {
console.log("nope");
} else { } else {
setModel({ filename: e.target.files[0].name, data: text }); setModel({ filename: e.target.files[0].name, data: text });
} }

View File

@ -9,7 +9,7 @@ export default function TagContainer({ tags }) {
const [invisible, setInvisible] = useState([]); const [invisible, setInvisible] = useState([]);
useLayoutEffect(() => { useLayoutEffect(() => {
if (ref.current.clientWidth < ref.current.scrollWidth) { if (ref.current.clientWidth < ref.current.scrollWidth) {
console.log("overflow", ref);
var element = ref.current; var element = ref.current;
var invi = []; var invi = [];
for (var i = 0; i < element.childElementCount; i++) { for (var i = 0; i < element.childElementCount; i++) {
@ -24,7 +24,7 @@ export default function TagContainer({ tags }) {
element.children[i].style.display = "none"; element.children[i].style.display = "none";
} }
} }
console.log(invi);
setInvisible([...invi]); setInvisible([...invi]);
} }
}, [ref]); }, [ref]);

View File

@ -229,7 +229,7 @@ export default function ParcoursView({ parcours_id, room_code, user }) {
}, [parcours]); }, [parcours]);
const router = useRouter(); const router = useRouter();
console.log("PARCOURS", parcours);
const [dataCorrection, setDataCorrection] = useState(); const [dataCorrection, setDataCorrection] = useState();
const [onglet, setOnglet] = useState("tab"); const [onglet, setOnglet] = useState("tab");

View File

@ -24,11 +24,11 @@ export const WebsocketProvider = ({ children }) => {
}); });
}; };
ws.current.onclose = (c) => { ws.current.onclose = (c) => {
console.log("CLOSED", c);
setConnected(false); setConnected(false);
}; };
ws.current.onerror = (e) => { ws.current.onerror = (e) => {
console.log("ERROR", e);
//router.push({ pathname: '/room/join' }) //router.push({ pathname: '/room/join' })
ws.current.close(); ws.current.close();

View File

@ -29,7 +29,7 @@ export default function Login() {
router.push({ pathname: "/dashboard" }); router.push({ pathname: "/dashboard" });
}) })
.catch((err) => { .catch((err) => {
console.log(err.response.data);
setError({ ...err.response.data }); setError({ ...err.response.data });
}); });
}} }}

View File

@ -39,7 +39,7 @@ export default function Register() {
router.push({ pathname: "/dashboard" }); router.push({ pathname: "/dashboard" });
}) })
.catch((err) => { .catch((err) => {
console.log(err.response.data);
setError({ ...err.response.data }); setError({ ...err.response.data });
}); });
}} }}