Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
avi278 committed May 1, 2024
1 parent fc5c1e9 commit d4e54bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
7 changes: 3 additions & 4 deletions src/components/bootstrap/research/research.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Slide = (props) => {
<div className={"slider__slide " + nameClass} >
<div className="block">
<h3 className="slide__titles">
<a href={"/blog/" + props.href} className="href">{props.title}</a>
<a href={"/research/" + props.href} className="href">{props.title}</a>
</h3>
<div className="slide__name">
{props.name}
Expand All @@ -52,7 +52,7 @@ export const Research = () => {

useEffect(() => {
community_files.forEach(element => {
const markdown = require('!!raw-loader!../../../../blog/' + element)?.default;
const markdown = require('!!raw-loader!../../../../research/' + element)?.default;

var extractedMetadata = extractMetadata(markdown);
extractedMetadata["id"] = (element.split('.')[0]).split('-').join('/');
Expand All @@ -64,7 +64,6 @@ export const Research = () => {
function extractMetadata(markdown) {
const frontMatter = markdown.split('---');

console.log(frontMatter.length);
if (frontMatter.length == 3) {

const metadataLines = frontMatter[1].split('\n').filter(line => line.trim() !== '');
Expand Down Expand Up @@ -152,7 +151,7 @@ export const Research = () => {
Stay up to date with library updates.
</div>
<div className="community-button w-100 p-3 pb-lg-5 lead">
<Link to="/blog" className="ps-lg-3">
<Link to="/research" className="ps-lg-3">
<Button variant="default">Go to Community</Button>
</Link>
</div>
Expand Down
12 changes: 1 addition & 11 deletions src/react/ReactGeovistoMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const ReactGeovistoMap: React.FC<IReactGeovistoMapProps> = (props) => {
var typingInterval = 5000;

const startTimer = () => {
console.log("start")
clearTimeout(typingTimer);
typingTimer = setTimeout(resultAction, typingInterval);
};
Expand Down Expand Up @@ -62,8 +61,6 @@ const ReactGeovistoMap: React.FC<IReactGeovistoMapProps> = (props) => {

useEffect(() => {
// create new Geovisto map

console.log("EFFECT");
if (!helpRef.current) {
// draw map with the current config
// timeout is set to fix crashing with leaflet
Expand All @@ -74,8 +71,6 @@ const ReactGeovistoMap: React.FC<IReactGeovistoMapProps> = (props) => {
props.config ??
Geovisto.getMapConfigManagerFactory().default({})
);
console.log("DRAW");
console.log(props.id);

// ignoring for base
if (props.id == 'my-geovisto-map') {
Expand All @@ -95,8 +90,6 @@ const ReactGeovistoMap: React.FC<IReactGeovistoMapProps> = (props) => {
setTimeout(() => {
mapRef.current.redraw(
props.config ?? Geovisto.getMapConfigManagerFactory().default({}), props);
console.log("REDRAW");
console.log(props.id);
}, 0);
}
}
Expand All @@ -108,12 +101,9 @@ const ReactGeovistoMap: React.FC<IReactGeovistoMapProps> = (props) => {
clearTimeout(typingTimer);
}

console.log("mapRef");
console.log(mapRef.current);

return () => {
clearTimeout(typingTimer);
console.log("cleaning up");
console.log("cleaning up react");
}
}, [props]);

Expand Down

0 comments on commit d4e54bd

Please sign in to comment.