Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
jvaclavik committed Feb 11, 2024
1 parent 2cacd3a commit dcadfab
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/components/FeaturePanel/Climbing/ClimbingPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const ClimbingPanel = ({ footer }) => {
<>
<PanelWrapper>
<PanelScrollbars>
{imageUrl && (
{photoPath && imageUrl && (
<ThumbnailContainer
height={isPhotoLoading ? 200 : imageSize.height}
>
Expand Down
5 changes: 0 additions & 5 deletions src/components/FeaturePanel/Climbing/Editor/RoutesEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ export const RoutesEditor = ({
const [transformOrigin] = useState({ x: 0, y: 0 }); // @TODO remove ?

const onCanvasClick = (e) => {
console.log('canvas click - not working now', {
x: e.clientX,
y: e.clientY,
});

if (machine.currentStateName === 'extendRoute') {
machine.execute('addPointToEnd', {
position: { x: e.clientX, y: e.clientY },
Expand Down
2 changes: 2 additions & 0 deletions src/components/FeaturePanel/Climbing/RouteList/RouteList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export const RouteList = ({ isEditable }: { isEditable?: boolean }) => {
};

const getRoutesJson = () => {
// eslint-disable-next-line no-console
console.log(`____EXPORT JSON`, JSON.stringify(routes));
};

Expand Down Expand Up @@ -112,6 +113,7 @@ export const RouteList = ({ isEditable }: { isEditable?: boolean }) => {
]);
})
.flat();
// eslint-disable-next-line no-console
console.table(object);
};

Expand Down
11 changes: 0 additions & 11 deletions src/components/FeaturePanel/Climbing/utils/getMachineFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,7 @@ export const getMachineFactory = ({
if (desiredAction in states[currentState]) {
const { nextState, callback } = states[currentState][desiredAction];
setCurrentState(nextState);
console.log(
'______CHANGE STATE____!',
desiredAction,
nextState,
props,
callback ? 'callback' : 'no callback',
routeSelectedIndex,
pointSelectedIndex,
);
if (callback) callback(props);
} else {
console.warn('wrong action', currentState, desiredAction);
}
},
});
Expand Down
4 changes: 2 additions & 2 deletions src/components/FeaturePanel/Climbing/utils/routeGrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const getCsvGradeData = () => {

export const exportGradeDataToWikiTable = () => {
const csvArray = csvToArray(gradeTableString);
const table = csvArray.map((row) => `|${row.join('\n|')}`).join('\n|-\n');
const data = csvArray.map((row) => `|${row.join('\n|')}`).join('\n|-\n');

console.log('_____WIKI table', table);
return data;
};

// @TODO use memo for this function?
Expand Down
1 change: 1 addition & 0 deletions src/services/images/getWikiImage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const getCommonsImageUrl = (
): string | null => {
if (!photoName) return null;
if (!photoName.startsWith('File:')) {
// eslint-disable-next-line no-console
console.warn('Invalid Commons photo name without "File:":', photoName);
return null;
}
Expand Down

0 comments on commit dcadfab

Please sign in to comment.